123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204 |
- <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="800" d:DesignHeight="600"
- x:Class="Prak12.Views.AddTeachersView"
- Background="CadetBlue">
-
- <UserControl.Styles>
- <Style Selector="HeaderedContentControl">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <TextBlock TextBlock.FontWeight="Bold" Text="{TemplateBinding Header}"
- Margin="10 0 0 0"/>
- <ContentPresenter Grid.Row="1" Content="{TemplateBinding Content}" />
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style Selector="ListBox.SelectedSubjectsList">
- <Setter Property="ItemTemplate">
- <DataTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="- "/>
- <TextBlock Grid.Column="1" Text="{Binding SubjectName}"/>
- </Grid>
- </DataTemplate>
- </Setter>
- </Style>
- </UserControl.Styles>
- <Border Padding="10">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Label Content="Добавление"
- FontSize="16" FontWeight="Bold" Grid.ColumnSpan="2"
- HorizontalAlignment="Center" Grid.Row="0"/>
- <Button Height="30" Width="30"
- Background="Red"
- Foreground="White"
- Content="X"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Command="{Binding CancelAddNewTeacherCommand}"
- VerticalAlignment="Top"/>
- <Grid Grid.Row="1" Grid.ColumnSpan="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <HeaderedContentControl Grid.Column="0"
- Header="Фамилия"
- Height="55"
- Margin="0 0 5 0">
- <TextBox VerticalAlignment="Center" Text="{Binding Teacher.TeacherSurname}"/>
- </HeaderedContentControl>
- <HeaderedContentControl Grid.Column="1"
- Header="Имя"
- Height="55"
- Margin="0 0 5 0">
- <TextBox VerticalAlignment="Center" Text="{Binding Teacher.TeacherName}"/>
- </HeaderedContentControl>
- <HeaderedContentControl Grid.Column="2"
- Header="Отчество"
- Height="55">
- <TextBox VerticalAlignment="Center" Text="{Binding Teacher.TeacherPatronymic}"/>
- </HeaderedContentControl>
- </Grid>
-
- <DatePicker Grid.Row="2" Grid.Column="1" SelectedDate="{Binding Date}" Margin="10 -40 0 0" />
- <ComboBox Grid.Row="3" Grid.Column="1" SelectedIndex="{Binding GenderComboboxId}" Margin="10 0 0 5">
- <ComboBoxItem>Мужчина</ComboBoxItem>
- <ComboBoxItem>Женщина</ComboBoxItem>
- </ComboBox>
- <HeaderedContentControl Grid.Row="4"
- Header="Стаж"
- Height="55"
- Grid.Column="1" Margin="10 -15 0 5">
- <TextBox VerticalAlignment="Center" Text="{Binding TeacherWorkTime}"/>
- </HeaderedContentControl>
- <HeaderedContentControl Grid.Row="5"
- Header="Почта"
- Height="55"
- Grid.Column="1"
- Margin="10 -15 0 5">
- <TextBox VerticalAlignment="Center" Text="{Binding Teacher.TeacherEmail}"/>
- </HeaderedContentControl>
- <HeaderedContentControl Grid.Row="6"
- Header="Телефон"
- Height="55"
- Grid.Column="1"
- Margin="10 -15 0 5">
- <TextBox VerticalAlignment="Center" Text="{Binding Teacher.TeacherPhoneNumber}"/>
- </HeaderedContentControl>
- <Grid Grid.Row="2" Grid.Column="0"
- Grid.RowSpan="5" >
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <ComboBox Grid.Row="0" Margin="0 0 0 10"
- HorizontalAlignment="Stretch"
- SelectedIndex="{Binding SelectedComboBoxSubjectId}"
- ItemsSource="{Binding UnselectedSubjects}"/>
- <ListBox Grid.Row="1"
- Classes="SelectedSubjectsList"
- ItemsSource="{Binding SelectedSubjects}"
- SelectedIndex="{Binding SelectedListBoxSubjectId}"/>
- </Grid>
- <Button Grid.Row="7" HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch" Margin="80 5 80 0"
- Width="100" Height="40"
- Background="White"
- BorderBrush="Black"
- BorderThickness="1"
- Grid.ColumnSpan="2" Command="{Binding AddNewTeacherCommand}">
- <TextBlock Text="Добавить"
- HorizontalAlignment="Center"
- Foreground="Black"
- VerticalAlignment="Center"/>
- </Button>
- </Grid>
- </Border>
-
- </UserControl>
|