semesterWork/Presence.Desktop/Views/PresenceView.axaml
2024-12-13 08:47:52 +03:00

50 lines
2.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:Presence.Desktop.ViewModels"
x:DataType="vm:PresenceViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Presence.Desktop.Views.PresenceView">
<StackPanel>
<!-- Верхняя панель с выбором группы и типа посещаемости -->
<StackPanel Orientation="Horizontal" Margin="10">
<TextBlock Text="Группа:" VerticalAlignment="Center" Margin="0,0,5,0" />
<ComboBox ItemsSource="{Binding Groups}"
SelectedItem="{Binding SelectedGroupItem}"
Width="200" Margin="0,0,10,0">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding GroupName}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="Тип посещаемости:" VerticalAlignment="Center" Margin="0,0,5,0" />
<ComboBox ItemsSource="{Binding AttendanceTypes}"
SelectedItem="{Binding SelectedAttendanceType}"
Width="200" Margin="0,0,10,0"/>
</StackPanel>
<TextBlock Text="PRivatik"/>
<Border BorderThickness="2" Background="Aqua">
<DataGrid Margin="20" ItemsSource="{Binding Presences}"
AutoGenerateColumns="True" IsReadOnly="True"
GridLinesVisibility="All" Height="300"
BorderThickness="1" BorderBrush="Gray">
<DataGrid.Columns>
<DataGridTextColumn Header="Ф.И.О." Binding="{Binding StudentFullName}" />
<DataGridTextColumn Header="Предмет" Binding="{Binding Subject}" />
<DataGridTextColumn Header="Дата" Binding="{Binding Date}" />
<DataGridTextColumn Header="Группа" Binding="{Binding GroupName}" />
<DataGridTextColumn Header="Номер урока" Binding="{Binding LessonNumber}" />
<DataGridTextColumn Header="Тип посещаемости" Binding="{Binding PresenceType}" />
</DataGrid.Columns>
</DataGrid>
</Border>
<!-- DataGrid для отображения посещаемости -->
</StackPanel>
</UserControl>