-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddEditClientWindow.xaml
More file actions
93 lines (82 loc) · 5.05 KB
/
Copy pathAddEditClientWindow.xaml
File metadata and controls
93 lines (82 loc) · 5.05 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<Window x:Class="MyPanelCarWashing.AddEditClientWindow"
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="{Binding WindowTitle}"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize"
Width="500" Height="950"
Background="#F5F6FA"
BorderBrush="Black"
BorderThickness="1"
WindowStyle="SingleBorderWindow"
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="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding WindowTitle}" FontSize="20" FontWeight="Bold"
Foreground="#2C3E50" HorizontalAlignment="Center" Margin="0,0,0,15" Grid.Row="0"/>
<Label Content="ФИО:" Grid.Row="1" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentClient.FullName, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="2" Margin="0,5" Height="50" Padding="5"/>
<Label Content="Телефон:" Grid.Row="3" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentClient.Phone, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="4" Margin="0,5" Height="50" Padding="5"/>
<Label Content="Марка/Модель авто:" Grid.Row="5" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentClient.CarModel, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="6" Margin="0,5" Height="50" Padding="5"/>
<Label Content="Государственный номер:" Grid.Row="7" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentClient.CarNumber, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="8" Margin="0,5" Height="50" Padding="5"/>
<Label Content="Примечание:" Grid.Row="9" Margin="0,5" FontWeight="SemiBold"/>
<TextBox Text="{Binding CurrentClient.Notes, UpdateSourceTrigger=PropertyChanged}"
Grid.Row="10" Margin="0,5" Height="80" Padding="5"
TextWrapping="Wrap" AcceptsReturn="True"/>
<!-- Стало (просто) - ВСТАВИТЬ вместо удалённого: -->
<Separator Grid.Row="11" Margin="0,15" Background="#BDC3C7"/>
<!-- Персональная скидка клиента -->
<TextBlock Text="Персональная скидка" Grid.Row="12"
FontSize="14" FontWeight="Bold" Foreground="#2C3E50" Margin="0,10,0,5"/>
<StackPanel Grid.Row="13" Orientation="Horizontal" Margin="0,5">
<Label Content="Скидка:" Width="80" VerticalContentAlignment="Center"/>
<StackPanel Orientation="Horizontal">
<TextBox x:Name="DiscountPercentTextBox"
Text="{Binding CurrentClient.DefaultDiscountPercent, UpdateSourceTrigger=PropertyChanged}"
Width="100" Height="40" Padding="5" HorizontalContentAlignment="Center"
PreviewTextInput="DiscountPercentTextBox_PreviewTextInput"/>
<TextBlock Text="%" VerticalAlignment="Center" Margin="5,0" FontSize="14"/>
<TextBlock Text="(0-100)" Foreground="#95A5A6" FontSize="11" VerticalAlignment="Center" Margin="10,0"/>
</StackPanel>
</StackPanel>
<TextBlock Text="Эта скидка будет автоматически подставляться при выборе клиента в заказе"
Grid.Row="14" FontSize="10" Foreground="#7F8C8D" Margin="85,5,0,0" TextWrapping="Wrap"/>
<StackPanel Grid.Row="15" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,15">
<Button Content="✅ Сохранить" Click="SaveButton_Click" Width="120" 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>