-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddEditEmployeeWindow.xaml
More file actions
70 lines (62 loc) · 3.81 KB
/
Copy pathAddEditEmployeeWindow.xaml
File metadata and controls
70 lines (62 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<Window x:Class="MyPanelCarWashing.AddEditEmployeeWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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"
xmlns:local="clr-namespace:MyPanelCarWashing"
mc:Ignorable="d"
Title="Редактирование сотрудника"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
Width="500" Height="650"
Background="#F5F6FA"
BorderBrush="Black"
BorderThickness="1"
WindowStyle="None"
Foreground="Black">
<Grid Margin="15">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Title}" FontSize="20" FontWeight="Bold"
Margin="0,0,0,15" Grid.Row="0"/>
<Label Content="ФИО:" Grid.Row="1" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentEmployee.FullName, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="2" Margin="0,5" Height="50" Padding="5" Foreground="Black"/>
<Label Content="📱 Телефон:" Grid.Row="3" Margin="0,5" FontWeight="SemiBold"/>
<TextBox x:Name="PhoneTextBox" Text="{Binding CurrentEmployee.Phone, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="4" Margin="0,5" Height="50" Padding="5" Foreground="Black"
PreviewTextInput="PhoneTextBox_PreviewTextInput"
TextChanged="PhoneTextBox_TextChanged" MaxLength="20"/>
<TextBlock Text=" формат: 89996094363" Foreground="#95A5A6"
Grid.Row="5" Margin="0,0,0,10" FontSize="11" HorizontalAlignment="Left"/>
<Label Content="Логин:" Grid.Row="6" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentEmployee.Login, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="7" Margin="0,5" Height="50" Padding="5" Foreground="Black"/>
<Label Content="Пароль:" Grid.Row="8" Margin="0,5" FontWeight="SemiBold"/>
<PasswordBox x:Name="PasswordBox" Grid.Row="9" Margin="0,5" Height="50" Padding="5" Foreground="Black" VerticalContentAlignment="Center"/>
<CheckBox Content="Администратор" IsChecked="{Binding CurrentEmployee.IsAdmin}"
Grid.Row="10" Margin="0,10" HorizontalAlignment="Left" Foreground="Black"/>
<!-- Добавляем CheckBox для статуса активности -->
<CheckBox Content="Трудоустроен" IsChecked="{Binding CurrentEmployee.IsActive}"
Grid.Row="11" Margin="0,10" HorizontalAlignment="Left" Foreground="Black"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="12" Margin="0,15">
<Button Content="✓ Сохранить" Click="SaveButton_Click" Width="100" Height="35"
Margin="5" Background="#27AE60" Foreground="White" Cursor="Hand"/>
<Button Content="✗ Отмена" Click="CloseButton_Click" Width="100" Height="35"
Margin="5" Background="#E74C3C" Foreground="White" Cursor="Hand"/>
</StackPanel>
</Grid>
</Window>