123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <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="450"
- x:Class="TeacheresAndCourses.AddTeacher"
- xmlns:vm="using:TeacheresAndCourses.ViewModels"
- x:DataType="vm:AddTeacherViewModel"
- xmlns:conv="using:TeacheresAndCourses.Converter">
- <UserControl.Resources>
- <conv:DateConverter x:Key="myConverter"/>
- </UserControl.Resources>
- <Grid>
- <ScrollViewer>
- <StackPanel Classes="addTeacherSP">
- <TextBlock Classes="addingTextFont">Регистрация преподавателя в системе</TextBlock>
- <StackPanel Classes="oneLine2">
- <StackPanel Classes="inputTextSP">
- <TextBlock Classes="addingTextStyle" Text="Фамилия: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Имя: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Отчество: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Пол: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="День рождения: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Опыт (в месяцах): "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Электронная почта: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Номер телефона: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Предметы: "></TextBlock>
- <TextBlock Classes="addingTextStyle" Text="Курсы: "></TextBlock>
- </StackPanel>
- <StackPanel>
- <TextBox Text="{Binding NewTeacher.Lastname}" Classes="inputTB"></TextBox>
- <TextBox Text="{Binding NewTeacher.Firstname}" Classes="inputTB"></TextBox>
- <TextBox Text="{Binding NewTeacher.Patronymic}" Classes="inputTB"></TextBox>
- <ComboBox Classes="inputCB" ItemsSource="{Binding genderList}" SelectedItem="{Binding NewTeacher.GenderNavigation}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Title}"></TextBlock>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <DatePicker SelectedDate="{Binding NewTeacher.Birthday, Converter={StaticResource myConverter}}" Classes="inputDP"></DatePicker>
- <TextBox Text="{Binding NewTeacher.ExperienceInMonth}" Classes="inputTB"></TextBox>
- <TextBox Text="{Binding NewTeacher.Email}" Classes="inputTB"></TextBox>
- <TextBox Text="{Binding NewTeacher.PhoneNumber}" Classes="inputTB"></TextBox>
- <ComboBox Classes="inputCB" ItemsSource="{Binding subjectList}" SelectedValue="{Binding NewSub}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Title}"></TextBlock>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
-
- <ComboBox Classes="inputCB" ItemsSource="{Binding courseList}" SelectedValue="{Binding NewCou}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Title}"></TextBlock>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Button Command="{Binding ToAddCoursePage}" Classes="saveButton">Добавить курс</Button>
- </StackPanel>
- </StackPanel>
- <StackPanel>
- <TextBlock Classes="selectedTextStyle" Text="Выбранные курсы"></TextBlock>
- </StackPanel>
- <StackPanel Classes="coursesAndSubjects">
- <ListBox Classes="addLB" ItemsSource="{Binding TeacCoursesList}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="{Binding Course.Title}"></TextBlock>
- <Button Command="{Binding $parent[UserControl].((vm:AddTeacherViewModel)DataContext).DeleteCou}" CommandParameter="{Binding}">Удалить</Button>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- <StackPanel Classes="coursesAndSubjects">
- <TextBlock Classes="selectedTextStyle" Text="Выбранные предметы"></TextBlock>
- </StackPanel>
- <StackPanel Classes="coursesAndSubjects">
- <ListBox Classes="addLB" ItemsSource="{Binding TeacSubjectsList}">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <StackPanel>
- <TextBlock Text="{Binding Subject.Title}"></TextBlock>
- <Button Command="{Binding $parent[UserControl].((vm:AddTeacherViewModel)DataContext).DeleteSub}" CommandParameter="{Binding}">Удалить</Button>
- </StackPanel>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- <Button Command="{Binding AddTeacher}" Classes="saveButton">
- <TextBlock Text="{Binding ButtonText}"></TextBlock>
- </Button>
- <Button Command="{Binding ToMainPage}" Classes="saveButton">На главную</Button>
- </StackPanel>
- </ScrollViewer>
- </Grid>
- </UserControl>
|