41 lines
1.9 KiB
XML
41 lines
1.9 KiB
XML
<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"
|
||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||
x:Class="Presence.Desktop.Views.PresenceView"
|
||
x:DataType="vm:PresenceViewModel">
|
||
|
||
<DockPanel Margin="10" Background="Aquamarine">
|
||
<StackPanel Orientation="Horizontal" Spacing="10" DockPanel.Dock="Top">
|
||
<!-- Выбор группы -->
|
||
<ComboBox ItemsSource="{Binding Groups}" SelectedItem="{Binding SelectedGroup}" Width="200" PlaceholderText="Выберите группу">
|
||
<ComboBox.ItemTemplate>
|
||
<DataTemplate>
|
||
<TextBlock Text="{Binding Name}" />
|
||
</DataTemplate>
|
||
</ComboBox.ItemTemplate>
|
||
</ComboBox>
|
||
|
||
<!-- Календарь -->
|
||
<Calendar SelectionMode="SingleRange" SelectedDatesChanged="DatesChanged"/>
|
||
|
||
</StackPanel>
|
||
|
||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||
<!-- Таблица с посещаемостью -->
|
||
<DataGrid AutoGenerateColumns="False" ItemsSource="{Binding AttendanceRecords}" CanUserSortColumns="True"
|
||
SelectionChanged="OnDataGridSelectionChanged">
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="Дата" Binding="{Binding Date}"/>
|
||
<DataGridTextColumn Header="Номер урока" Binding="{Binding ClassNumber}" />
|
||
<DataGridTextColumn Header="ФИО" Binding="{Binding User.Name}" />
|
||
<DataGridCheckBoxColumn Header="Тип посещаемости" Binding="{Binding IsAttendence, Mode=TwoWay}" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
<Button Content="Удалить" Margin="0,10,0,0" Command="{Binding DeleteSelectedPresenceCommand}" />
|
||
|
||
</StackPanel>
|
||
</DockPanel>
|
||
</UserControl> |