presence/Presence.Desktop/Views/PresenceView.axaml

37 lines
1.7 KiB
Plaintext
Raw Normal View History

2024-12-18 08:42:44 +00:00
<UserControl xmlns="https://github.com/avaloniaui"
2024-12-19 07:27:17 +00:00
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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Presence.Desktop.Views.PresenceView"
x:DataType="vm:PresenceViewModel">
2024-12-18 07:19:58 +00:00
2024-12-20 09:16:16 +00:00
<Grid RowDefinitions="Auto, Auto, *, Auto" Margin="10">
<StackPanel Orientation="Horizontal" Grid.Row="0" Spacing="10">
<!-- Выбор группы -->
<ComboBox ItemsSource="{Binding Groups}" SelectedItem="{Binding SelectedGroup}" Width="200" PlaceholderText="Выберите группу">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<!-- Календарь -->
<Calendar SelectedDate="{Binding SelectedDate}" />
</StackPanel>
2024-12-19 07:27:17 +00:00
2024-12-20 09:16:16 +00:00
<!-- Таблица с посещаемостью -->
<DataGrid Grid.Row="2" AutoGenerateColumns="False" ItemsSource="{Binding AttendanceRecords}" CanUserSortColumns="True">
<DataGrid.Columns>
<DataGridTextColumn Header="Дата" Binding="{Binding Date}" />
<DataGridTextColumn Header="Номер урока" Binding="{Binding LessonNumber}" />
<DataGridTextColumn Header="ФИО" Binding="{Binding UserGuid}" />
<!-- Тип посещаемости -->
<DataGridCheckBoxColumn Header="Тип посещаемости" Binding="{Binding IsAttedance, Mode=TwoWay}" />
</DataGrid.Columns>
</DataGrid>
</Grid>
2024-12-19 07:27:17 +00:00
</UserControl>