last-commit

This commit is contained in:
1eG0ist 2024-12-13 10:34:58 +03:00
parent 8648e3efaf
commit 3ca477dd51
4 changed files with 5 additions and 2 deletions

View File

@ -6,5 +6,6 @@
<Application.Styles> <Application.Styles>
<FluentTheme /> <FluentTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
</Application.Styles> </Application.Styles>
</Application> </Application>

View File

@ -14,6 +14,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.1" /> <PackageReference Include="Avalonia" Version="11.2.1" />
<PackageReference Include="Avalonia.Controls.DataGrid" Version="11.2.1" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.1" /> <PackageReference Include="Avalonia.Desktop" Version="11.2.1" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.1" /> <PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.1" />
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.1" /> <PackageReference Include="Avalonia.Fonts.Inter" Version="11.2.1" />

View File

@ -116,6 +116,7 @@ public class PresenceViewModel : ViewModelBase
{ {
if (string.IsNullOrEmpty(SelectedAttendanceType)) return; if (string.IsNullOrEmpty(SelectedAttendanceType)) return;
UpdatePresences();
var filteredPresences = _presences.Where(a => a.PresenceType == SelectedAttendanceType).ToList(); var filteredPresences = _presences.Where(a => a.PresenceType == SelectedAttendanceType).ToList();
_presences.Clear(); _presences.Clear();
foreach (var attendance in filteredPresences) foreach (var attendance in filteredPresences)

View File

@ -30,8 +30,8 @@
<TextBlock Text="PRivatik"/> <TextBlock Text="PRivatik"/>
<Border BorderThickness="2" Background="Aqua"> <Border BorderThickness="2" Background="Aqua">
<DataGrid Margin="20" ItemsSource="{Binding Presences}" <DataGrid Margin="20" ItemsSource="{Binding Presences}"
AutoGenerateColumns="True" IsReadOnly="True" AutoGenerateColumns="False" IsReadOnly="True"
GridLinesVisibility="All" Height="300" GridLinesVisibility="All" Height="300" CanUserSortColumns="True"
BorderThickness="1" BorderBrush="Gray"> BorderThickness="1" BorderBrush="Gray">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="Ф.И.О." Binding="{Binding StudentFullName}" /> <DataGridTextColumn Header="Ф.И.О." Binding="{Binding StudentFullName}" />