12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <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"
- mc:Ignorable="d" d:DesignWidth="1000" d:DesignHeight="990"
- x:Class="AvaloniaApplication4.Views.StudyLists.DiffCredit"
- xmlns:vm="using:AvaloniaApplication4.ViewModels.StudyListsViewModels"
- x:DataType="vm:DiffCreditViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 20 0 0">
- <Grid Margin="0 0 0 36" HorizontalAlignment="Stretch">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" HorizontalAlignment="Stretch" Text="Зачетная ведомость" Classes="titleStyle" FontWeight="Bold" TextWrapping="Wrap"/>
- <Button HorizontalAlignment="Stretch" Margin="5 0 5 0" Content="Сохранить в файл" Command="{Binding $parent[UserControl].((vm:DiffCreditViewModel)DataContext).SaveToFile}" Name="SaveToFile" Grid.Column="2"/>
- </Grid>
- <StackPanel Orientation="Horizontal" Margin="0 0 0 20">
- <TextBlock Classes="mediumText" FontSize="24" Text="Дисциплина: "/>
- <TextBlock Classes="mediumText" Text="{Binding Subject.IdSubjectNavigation.NameSubject}" FontSize="24"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 0 0 20">
- <TextBlock Classes="mediumText" FontSize="24" Text="Преподаватель: "/>
- <ComboBox IsEnabled="{Binding IsAdmin}" ItemsSource="{Binding AllUsers}" SelectedItem="{Binding Teacher,Mode=TwoWay}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock Classes="mediumText" Text="{Binding Surname}" FontSize="24"/>
- <TextBlock Classes="mediumText" Text=" " FontSize="24"/>
- <TextBlock Classes="mediumText" Text="{Binding Name}" FontSize="24"/>
- <TextBlock Classes="mediumText" Text=" " FontSize="24"/>
- <TextBlock Classes="mediumText" Text="{Binding Patronumic}" FontSize="24"/>
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <DataGrid AutoGenerateColumns="False" GridLinesVisibility="All" BorderThickness="1" BorderBrush="Gray" HorizontalAlignment="Stretch" Margin="0 0 0 20" ItemsSource="{Binding AllGradesBinding}">
- <DataGrid.Columns>
- <DataGridTextColumn IsReadOnly="True" Header="№ п/п" Binding="{Binding Grade.IdStudent}"/>
- <DataGridTextColumn IsReadOnly="True" Header="Фамилия" Binding="{Binding Grade.IdStudentNavigation.Surname}"/>
- <DataGridTextColumn IsReadOnly="True" Header="Имя" Binding="{Binding Grade.IdStudentNavigation.Name}"/>
- <DataGridTextColumn IsReadOnly="True" Header="Отчество" Binding="{Binding Grade.IdStudentNavigation.Patronumic}"/>
- <DataGridTemplateColumn Header="Оценка">
- <DataTemplate>
- <ComboBox ItemsSource="{Binding AllGradesInBase}" SelectedIndex="{Binding IdGradle, Mode=TwoWay}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name}"/>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </DataTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- <DataGrid HorizontalAlignment="Stretch" ItemsSource="{Binding ForBindingList.Statistics}" IsReadOnly="True" Margin="0 0 0 20">
- <DataGrid.Columns>
- <DataGridTextColumn Header="Всего студентов" Binding="{Binding CountStudents}"/>
- <DataGridTextColumn Header="Аттестовано" Binding="{Binding CountAtt}"/>
- <DataGridTextColumn Header="на 5" Binding="{Binding CountGrade5}"/>
- <DataGridTextColumn Header="на 4" Binding="{Binding CountGrade4}"/>
- <DataGridTextColumn Header="на 3" Binding="{Binding CountGrade3}"/>
- <DataGridTextColumn Header="на 2" Binding="{Binding CountGrade2}"/>
- <DataGridTextColumn Header="Не аттестовано" Binding="{Binding CountNotAtt}"/>
- <DataGridTextColumn Header="Неявка" Binding="{Binding CountNotCome}"/>
- </DataGrid.Columns>
- </DataGrid>
- <Button HorizontalAlignment="Stretch" Content="Вернуться назад" Command="{Binding $parent[UserControl].((vm:DiffCreditViewModel)DataContext).GoBack}"/>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|