TeacherAdd.axaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
  6. MinWidth="800" MinHeight="450"
  7. x:Class="N11_1.Views.TeacherAdd"
  8. xmlns:vm="using:N11_1.ViewModels"
  9. x:DataType="vm:MainWindowViewModel">
  10. <ScrollViewer>
  11. <Grid Margin="10 0">
  12. <Grid.RowDefinitions>
  13. <RowDefinition Height="Auto"></RowDefinition>
  14. <RowDefinition Height="Auto"></RowDefinition>
  15. <RowDefinition Height="Auto"></RowDefinition>
  16. <RowDefinition Height="Auto"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <Grid Grid.Row="0">
  19. <Button Command="{Binding BackToHome}" HorizontalAlignment="Left">Назад</Button>
  20. <Button Command="{Binding AddTeacher}" HorizontalAlignment="Right">Добавить</Button>
  21. </Grid>
  22. <StackPanel Grid.Row="1" Orientation="Vertical" Margin="0 10">
  23. <TextBlock Classes="h1">Личная информация:</TextBlock>
  24. <StackPanel Orientation="Horizontal">
  25. <StackPanel Orientation="Vertical" Margin="5">
  26. <TextBlock>Фамилия</TextBlock>
  27. <TextBox Text="{Binding TeacherAdd.Surname}" Watermark="Введите фамилию"></TextBox>
  28. </StackPanel>
  29. <StackPanel Orientation="Vertical" Margin="5">
  30. <TextBlock>Имя</TextBlock>
  31. <TextBox Text="{Binding TeacherAdd.Name}" Watermark="Введите имя"></TextBox>
  32. </StackPanel>
  33. <StackPanel Orientation="Vertical" Margin="5">
  34. <TextBlock>Отчество</TextBlock>
  35. <TextBox Text="{Binding TeacherAdd.Patronomic}" Watermark="Введите отчество"></TextBox>
  36. </StackPanel>
  37. </StackPanel>
  38. <TextBlock Margin="5">Пол</TextBlock>
  39. <StackPanel Orientation="Horizontal" Margin="5">
  40. <RadioButton IsChecked="{Binding TeacherAdd.GenderM}">Мужской</RadioButton>
  41. <RadioButton IsChecked="{Binding TeacherAdd.GenderG}" Margin="10 0">Женский</RadioButton>
  42. </StackPanel>
  43. <TextBlock Margin="5">Дата рождения</TextBlock>
  44. <DatePicker SelectedDate="{Binding TeacherAdd.Dateofbirthd}"></DatePicker>
  45. <TextBlock Margin="5">Стаж работы</TextBlock>
  46. <TextBox Text="{Binding TeacherAdd.WorkExpensive}" Watermark="Введите стаж работы в месяцах" Width="400" HorizontalAlignment="Left" Margin="5"></TextBox>
  47. </StackPanel>
  48. <StackPanel Grid.Row="2" Margin="0 10">
  49. <TextBlock Classes="h1">Контактная информация:</TextBlock>
  50. <StackPanel Orientation="Horizontal">
  51. <StackPanel Orientation="Vertical" Margin="5">
  52. <TextBlock>Почта</TextBlock>
  53. <TextBox Text="{Binding TeacherAdd.Mail}" Watermark="Введите email"></TextBox>
  54. </StackPanel>
  55. <StackPanel Orientation="Vertical" Margin="5">
  56. <TextBlock>Номер телефона</TextBlock>
  57. <TextBox Text="{Binding TeacherAdd.Phone}" Watermark="Введите номер телефона"></TextBox>
  58. </StackPanel>
  59. </StackPanel>
  60. </StackPanel>
  61. <StackPanel Grid.Row="3" Margin="0 10">
  62. <TextBlock Classes="h1">Преподаваемые предметы:</TextBlock>
  63. <ComboBox ItemsSource="{Binding TeacherAdd.Lesson}"
  64. SelectedValue="{Binding TeacherAdd.SelectedValueLesson}"></ComboBox>
  65. <ListBox ItemsSource="{Binding TeacherAdd.SelectedLesson}"
  66. SelectedValue="{Binding TeacherAdd.DeleteValueLesson}"></ListBox>
  67. </StackPanel>
  68. </Grid>
  69. </ScrollViewer>
  70. </UserControl>