semesterWork/Presence.Desktop/Views/PresenceView.axaml

50 lines
2.7 KiB
Plaintext
Raw Normal View History

2024-12-08 15:00:30 +00:00
<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"
2024-12-13 05:47:52 +00:00
xmlns:vm="using:Presence.Desktop.ViewModels"
x:DataType="vm:PresenceViewModel"
2024-12-08 15:00:30 +00:00
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Presence.Desktop.Views.PresenceView">
2024-12-13 05:47:52 +00:00
<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}"
2024-12-13 07:34:58 +00:00
AutoGenerateColumns="False" IsReadOnly="True"
GridLinesVisibility="All" Height="300" CanUserSortColumns="True"
2024-12-13 05:47:52 +00:00
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>
2024-12-08 15:00:30 +00:00
</UserControl>