1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <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.EditAndAddEmployee"
- xmlns:vm="using:AvaloniaApplication4.ViewModels"
- x:DataType="vm:EditAndAddEmployeeViewModel"
- Background="White"
- Padding="80">
- <ScrollViewer>
- <StackPanel Margin="0 0 0 23" Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Top">
- <TextBlock Margin="0 0 0 36" Text="Сотрудники" Classes="titleStyle" FontWeight="Bold"/>
- <TextBlock Margin="0 0 0 20" Text="Личная информация" Classes="mediumText" FontWeight="Bold"/>
- <TextBox Text="{Binding Employee.Surname}" Watermark="Фамилия сотрудника" Margin="0 0 0 10" TextWrapping="NoWrap" HorizontalAlignment="Stretch"/>
- <TextBox Text="{Binding Employee.Name}" Watermark="Имя сотрудника" Margin="0 0 0 10" TextWrapping="NoWrap" HorizontalAlignment="Stretch"/>
- <TextBox Text="{Binding Employee.Patronumic}" Watermark="Отчество сотрудника" Margin="0 0 0 10" TextWrapping="NoWrap" HorizontalAlignment="Stretch"/>
- <TextBlock Margin="0 0 0 20" Text="Авторизация" Classes="mediumText" FontWeight="Bold"/>
- <TextBox Watermark="Логин сотрудника" Text="{Binding EmployeeLogin.UserEmail}" Margin="0 0 0 10" TextWrapping="NoWrap" HorizontalAlignment="Stretch"/>
- <TextBox Watermark="Пароль сотрудника" Text="{Binding EmployeeLogin.Password}" Margin="0 0 0 10" TextWrapping="NoWrap" HorizontalAlignment="Stretch"/>
- <TextBlock Margin="0 0 0 36" Text="Роли сотрудника" Classes="mediumText" FontWeight="Bold"/>
- <StackPanel Orientation="Horizontal" Margin="0 0 0 10">
- <CheckBox IsChecked="{Binding IsAdmin, Mode=TwoWay}" Margin="0 0 5 0"/>
- <TextBlock Text="Администратор"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0 0 0 10">
- <CheckBox IsChecked="{Binding IsTutor, Mode=TwoWay}" Margin="0 0 5 0"/>
- <TextBlock Text="Куратор всех программ"/>
- </StackPanel>
- <Grid Margin="0 5 0 40">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Button HorizontalAlignment="Stretch" Grid.Column="0" Content="Сохранить" Margin="0 0 5 0" Command="{Binding $parent[UserControl].((vm:EditAndAddEmployeeViewModel)DataContext).SaveChanges}"/>
- <Button HorizontalAlignment="Stretch" Grid.Column="1" IsEnabled="{Binding IsNotNew}" Content="Удалить сотрудника" Margin="5 0 0 0" Command="{Binding $parent[UserControl].((vm:EditAndAddEmployeeViewModel)DataContext).Delete}"/>
- </Grid>
- <Button Content="Вернуться назад" HorizontalAlignment="Stretch" Command="{Binding $parent[UserControl].((vm:EditAndAddEmployeeViewModel)DataContext).GoBack}"/>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|