diff --git a/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.metadata.v9.bin b/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.metadata.v9.bin index fbcdf80..08a66b6 100644 Binary files a/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.metadata.v9.bin and b/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.metadata.v9.bin differ diff --git a/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.projects.v9.bin b/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.projects.v9.bin index e96f54f..232f70f 100644 Binary files a/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.projects.v9.bin and b/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.projects.v9.bin differ diff --git a/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.strings.v9.bin b/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.strings.v9.bin index e1ec0c8..f69feef 100644 Binary files a/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.strings.v9.bin and b/demo_blagodat/.vs/ProjectEvaluation/demo_blagodat.strings.v9.bin differ diff --git a/demo_blagodat/.vs/demo_blagodat/DesignTimeBuild/.dtbcache.v2 b/demo_blagodat/.vs/demo_blagodat/DesignTimeBuild/.dtbcache.v2 index 7f2267d..b910426 100644 Binary files a/demo_blagodat/.vs/demo_blagodat/DesignTimeBuild/.dtbcache.v2 and b/demo_blagodat/.vs/demo_blagodat/DesignTimeBuild/.dtbcache.v2 differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/1f18dded-6859-4580-8f0f-47f8b916cb02.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/1f18dded-6859-4580-8f0f-47f8b916cb02.vsidx new file mode 100644 index 0000000..574eb2f Binary files /dev/null and b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/1f18dded-6859-4580-8f0f-47f8b916cb02.vsidx differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/209f809b-738f-4429-979d-680294b0f4e1.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/209f809b-738f-4429-979d-680294b0f4e1.vsidx deleted file mode 100644 index 345b1bc..0000000 Binary files a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/209f809b-738f-4429-979d-680294b0f4e1.vsidx and /dev/null differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/2749711f-8b86-493c-a9c6-107ac2e2433a.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/2749711f-8b86-493c-a9c6-107ac2e2433a.vsidx deleted file mode 100644 index 0a9d29c..0000000 Binary files a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/2749711f-8b86-493c-a9c6-107ac2e2433a.vsidx and /dev/null differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/2e128b88-d9ec-4e1f-9514-4bca99a7cfd8.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/2e128b88-d9ec-4e1f-9514-4bca99a7cfd8.vsidx deleted file mode 100644 index b765c41..0000000 Binary files a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/2e128b88-d9ec-4e1f-9514-4bca99a7cfd8.vsidx and /dev/null differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/452d8d05-6d91-4dd9-83e3-0d44b1bc1c53.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/452d8d05-6d91-4dd9-83e3-0d44b1bc1c53.vsidx new file mode 100644 index 0000000..345f203 Binary files /dev/null and b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/452d8d05-6d91-4dd9-83e3-0d44b1bc1c53.vsidx differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/4eefa943-f83b-4b96-b351-5645873298b6.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/4eefa943-f83b-4b96-b351-5645873298b6.vsidx deleted file mode 100644 index cbd4b3d..0000000 Binary files a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/4eefa943-f83b-4b96-b351-5645873298b6.vsidx and /dev/null differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/759fedc7-d6b1-4153-9f6a-0de97ee5872a.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/759fedc7-d6b1-4153-9f6a-0de97ee5872a.vsidx new file mode 100644 index 0000000..6924582 Binary files /dev/null and b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/759fedc7-d6b1-4153-9f6a-0de97ee5872a.vsidx differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/a6ae9991-7d39-4ace-9cc8-198ca0cafdee.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/a6ae9991-7d39-4ace-9cc8-198ca0cafdee.vsidx deleted file mode 100644 index 40d20d4..0000000 Binary files a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/a6ae9991-7d39-4ace-9cc8-198ca0cafdee.vsidx and /dev/null differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/b92c50d9-e379-4528-9c10-1dffad60b15e.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/b92c50d9-e379-4528-9c10-1dffad60b15e.vsidx new file mode 100644 index 0000000..2aa3c62 Binary files /dev/null and b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/b92c50d9-e379-4528-9c10-1dffad60b15e.vsidx differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/cec6b7bf-48de-443b-b05c-ffe6888169bb.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/cec6b7bf-48de-443b-b05c-ffe6888169bb.vsidx new file mode 100644 index 0000000..5c88e10 Binary files /dev/null and b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/cec6b7bf-48de-443b-b05c-ffe6888169bb.vsidx differ diff --git a/demo_blagodat/.vs/demo_blagodat/FileContentIndex/e8a7cde9-6574-4924-a0fb-5ac8f44a939b.vsidx b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/e8a7cde9-6574-4924-a0fb-5ac8f44a939b.vsidx new file mode 100644 index 0000000..9060d03 Binary files /dev/null and b/demo_blagodat/.vs/demo_blagodat/FileContentIndex/e8a7cde9-6574-4924-a0fb-5ac8f44a939b.vsidx differ diff --git a/demo_blagodat/.vs/demo_blagodat/v17/.futdcache.v2 b/demo_blagodat/.vs/demo_blagodat/v17/.futdcache.v2 index 2baa988..b783ec7 100644 Binary files a/demo_blagodat/.vs/demo_blagodat/v17/.futdcache.v2 and b/demo_blagodat/.vs/demo_blagodat/v17/.futdcache.v2 differ diff --git a/demo_blagodat/.vs/demo_blagodat/v17/.suo b/demo_blagodat/.vs/demo_blagodat/v17/.suo index b4e33c9..8496366 100644 Binary files a/demo_blagodat/.vs/demo_blagodat/v17/.suo and b/demo_blagodat/.vs/demo_blagodat/v17/.suo differ diff --git a/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.backup.json b/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.backup.json index 069705e..1380a06 100644 --- a/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.backup.json +++ b/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.backup.json @@ -3,8 +3,8 @@ "WorkspaceRootPath": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|c:\\users\\vivobook 15x\\desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\demo_blagodat\\demo_blagodat\\demo_blagodat\\functions\\addclient.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", - "RelativeMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|solutionrelative:functions\\addclient.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" + "AbsoluteMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|c:\\users\\vivobook 15x\\desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\demo_blagodat\\demo_blagodat\\demo_blagodat\\users\\admin.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", + "RelativeMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|solutionrelative:users\\admin.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" } ], "DocumentGroupContainers": [ @@ -27,13 +27,13 @@ { "$type": "Document", "DocumentIndex": 0, - "Title": "AddClient.axaml", - "DocumentMoniker": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Functions\\AddClient.axaml", - "RelativeDocumentMoniker": "Functions\\AddClient.axaml", - "ToolTip": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Functions\\AddClient.axaml", - "RelativeToolTip": "Functions\\AddClient.axaml", + "Title": "Admin.axaml", + "DocumentMoniker": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Users\\Admin.axaml", + "RelativeDocumentMoniker": "Users\\Admin.axaml", + "ToolTip": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Users\\Admin.axaml", + "RelativeToolTip": "Users\\Admin.axaml", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", - "WhenOpened": "2025-02-26T20:55:34.609Z", + "WhenOpened": "2025-03-01T13:52:46.864Z", "EditorCaption": "" } ] diff --git a/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.json b/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.json index 069705e..38b022e 100644 --- a/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.json +++ b/demo_blagodat/.vs/demo_blagodat/v17/DocumentLayout.json @@ -1,12 +1,7 @@ { "Version": 1, "WorkspaceRootPath": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\", - "Documents": [ - { - "AbsoluteMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|c:\\users\\vivobook 15x\\desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\demo_blagodat\\demo_blagodat\\demo_blagodat\\functions\\addclient.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}", - "RelativeMoniker": "D:0:0:{B40AB1D5-A904-4458-95A8-8CAE49BE0884}|demo_blagodat.csproj|solutionrelative:functions\\addclient.axaml||{6D5344A2-2FCD-49DE-A09D-6A14FD1B1224}" - } - ], + "Documents": [], "DocumentGroupContainers": [ { "Orientation": 0, @@ -14,7 +9,7 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 2, + "SelectedChildIndex": -1, "Children": [ { "$type": "Bookmark", @@ -23,18 +18,6 @@ { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" - }, - { - "$type": "Document", - "DocumentIndex": 0, - "Title": "AddClient.axaml", - "DocumentMoniker": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Functions\\AddClient.axaml", - "RelativeDocumentMoniker": "Functions\\AddClient.axaml", - "ToolTip": "C:\\Users\\VivoBook 15X\\Desktop\\\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u044B\u0435 \u043C\u043E\u0434\u0443\u043B\u0438\\Demo_Blagodat\\demo_blagodat\\demo_blagodat\\Functions\\AddClient.axaml", - "RelativeToolTip": "Functions\\AddClient.axaml", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003549|", - "WhenOpened": "2025-02-26T20:55:34.609Z", - "EditorCaption": "" } ] } diff --git a/demo_blagodat/Authorization.axaml b/demo_blagodat/Entry/Authorization.axaml similarity index 100% rename from demo_blagodat/Authorization.axaml rename to demo_blagodat/Entry/Authorization.axaml diff --git a/demo_blagodat/Authorization.axaml.cs b/demo_blagodat/Entry/Authorization.axaml.cs similarity index 100% rename from demo_blagodat/Authorization.axaml.cs rename to demo_blagodat/Entry/Authorization.axaml.cs diff --git a/demo_blagodat/Registration.axaml b/demo_blagodat/Entry/Registration.axaml similarity index 100% rename from demo_blagodat/Registration.axaml rename to demo_blagodat/Entry/Registration.axaml diff --git a/demo_blagodat/Registration.axaml.cs b/demo_blagodat/Entry/Registration.axaml.cs similarity index 95% rename from demo_blagodat/Registration.axaml.cs rename to demo_blagodat/Entry/Registration.axaml.cs index cfe23cd..391ebca 100644 --- a/demo_blagodat/Registration.axaml.cs +++ b/demo_blagodat/Entry/Registration.axaml.cs @@ -20,13 +20,13 @@ public partial class Registration : Window public void sellerUser(object? sender, RoutedEventArgs e) { PositionUser = "��������"; - position.Text = position.Text + PositionUser; + position.Text = "�������� ���������: " + PositionUser; } public void shiftSupervisorUser(object? sender, RoutedEventArgs e) { PositionUser = "������� �����"; - position.Text = position.Text + PositionUser; + position.Text = "�������� ���������: " + PositionUser; } private void RegisterClick_OnClick(object? sender, RoutedEventArgs e) diff --git a/demo_blagodat/Functions/AddClient.axaml.cs b/demo_blagodat/Functions/AddClient.axaml.cs index 24f50e6..fbc296e 100644 --- a/demo_blagodat/Functions/AddClient.axaml.cs +++ b/demo_blagodat/Functions/AddClient.axaml.cs @@ -49,7 +49,7 @@ public partial class AddClient : Window // ��������� ������������ � �� db.Clients.Add(client); - db.SaveChanges(); + db.SaveChanges(); // ��������� ��������� // ������� ��� ������ TextName.Text = ""; diff --git a/demo_blagodat/Functions/CreateOrder.axaml b/demo_blagodat/Functions/AddOrder.axaml similarity index 100% rename from demo_blagodat/Functions/CreateOrder.axaml rename to demo_blagodat/Functions/AddOrder.axaml diff --git a/demo_blagodat/Functions/CreateOrder.axaml.cs b/demo_blagodat/Functions/AddOrder.axaml.cs similarity index 100% rename from demo_blagodat/Functions/CreateOrder.axaml.cs rename to demo_blagodat/Functions/AddOrder.axaml.cs diff --git a/demo_blagodat/Functions/ChangeClient.axaml b/demo_blagodat/Functions/ChangeClient.axaml new file mode 100644 index 0000000..f91f406 --- /dev/null +++ b/demo_blagodat/Functions/ChangeClient.axaml @@ -0,0 +1,98 @@ +<Window 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="demo_blagodat.ChangeClient" + Title="Изменить клиента"> + <StackPanel Spacing="15" Orientation="Vertical"> + <TextBlock Text="Введите имя клиента, которого хотите изменить:"/> + <TextBox x:Name="Name"/> + + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите ФИО"/> + <TextBox Width="300" x:Name="TextNewName" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите Паспорт"/> + <TextBox Width="300" x:Name="TextNewPassport" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите дату рождения (цифрами)"/> + <TextBox Width="300" x:Name="TextNewBirthday" Text=""/> + </StackPanel> + + </StackPanel> + + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите адрес"/> + <TextBox Width="300" Height="90" x:Name="TextNewAddress" TextWrapping="Wrap" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите Email"/> + <TextBox Width="300" x:Name="TextNewEmail" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите пароль"/> + <TextBox Width="300" x:Name="TextNewPassword" Text=""/> + </StackPanel> + + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Изменить данные Клиента" Click="changeClient"/> + <Button Content="Отчислить данные" Click="clear"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesAddError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesAdd" Text="" Foreground="Green"/> + </StackPanel> + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="ФИО"/> + <TextBlock Width="300" x:Name="SelectName"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Паспорт"/> + <TextBlock Width="300" x:Name="SelectPassport"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Дата рождения"/> + <TextBlock Width="300" x:Name="SelectBirthday"/> + </StackPanel> + + </StackPanel> + + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Адрес"/> + <TextBlock Width="300" Height="90" x:Name="SelectAddress" TextWrapping="Wrap"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Email"/> + <TextBlock Width="300" x:Name="SelectEmail"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Пароль"/> + <TextBlock Width="300" x:Name="SelectPassword"/> + </StackPanel> + + </StackPanel> + + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/ChangeClient.axaml.cs b/demo_blagodat/Functions/ChangeClient.axaml.cs new file mode 100644 index 0000000..e58fcc2 --- /dev/null +++ b/demo_blagodat/Functions/ChangeClient.axaml.cs @@ -0,0 +1,186 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System.Linq; +using System; + +namespace demo_blagodat; + +public partial class ChangeClient : Window +{ + public Employee User; + public ChangeClient(Employee user) + { + InitializeComponent(); + User = user; + } + + private void changeClient(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + // ���������� ����������� ������������ + string? name = Name.Text; + + // �������� ��� ������ � ������ + string? newname = TextNewName.Text; + string? newpas = TextNewPassport.Text; + string? newaddress = TextNewAddress.Text; + DateOnly? newdate = DateOnly.TryParse(TextNewBirthday.Text, out var BirthDate) ? BirthDate : null; + string? newemail = TextNewEmail.Text; + string? newpassword = TextNewPassword.Text; + + if (name != "") + { + using (User11Context db = new User11Context()) // ����������� � �� + { + Client? client = db.Clients.Where(it => it.ClientName == name).FirstOrDefault(); + if (client != null) + { + if (newname != "") + { + client.ClientName = newname; // ������ �������� "���" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (newpas != "") + { + client.ClientPassport = newpas; // ������ �������� "�������" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (newdate != null) + { + client.ClientBirthday = (DateOnly) newdate;// ������ �������� "���� ��������" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (newemail != "") + { + client.ClientEmail = newemail; // ������ �������� "�����" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (newpassword != "") + { + client.ClientPassword = newpassword; // ������ �������� "������" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (newaddress != "") + { + client.ClientAddress = newaddress; // ������ �������� "������" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + + if(TextNewName.Text == "" && TextNewPassport.Text == "" && TextNewBirthday.Text == "" && TextNewEmail.Text == "" && TextNewPassword.Text == "" && TextNewAddress.Text == "") + { + // ��������� + MesAdd.Text = ""; + MesAddError.Text = "������� ����� ������"; + } + check(client); + } + else + { + MesAdd.Text = ""; + MesAddError.Text = "������ ������� ���"; + } + } + } + else + { + MesAddError.Text = "������� ���������� ����������� �������"; + } + + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); // ������� ��������� �� ������ � ������� + + // ������ ��������� + MesAdd.Text = ""; + MesAddError.Text = "��������� ������"; + } + } + + private void clear(object sender, RoutedEventArgs e) + { + TextNewName.Text = ""; + TextNewPassport.Text = ""; + TextNewBirthday.Text = ""; + TextNewAddress.Text = ""; + TextNewEmail.Text = ""; + TextNewPassword.Text = ""; + } + + private void check(Client client) + { + using (User11Context db = new User11Context()) // ����������� � �� + { + + Client checkclient = db.Clients.Where(it => it.ClientName == client.ClientName).FirstOrDefault(); + + SelectName.Text = checkclient.ClientName; + SelectPassport.Text = checkclient.ClientPassport; + SelectPassword.Text = checkclient.ClientPassword; + SelectAddress.Text = checkclient.ClientAddress; + SelectEmail.Text = checkclient.ClientEmail; + SelectBirthday.Text = checkclient.ClientBirthday.ToString(); + } + } + + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + Close(); + } + + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/ChangeOrder.axaml b/demo_blagodat/Functions/ChangeOrder.axaml new file mode 100644 index 0000000..a38d12b --- /dev/null +++ b/demo_blagodat/Functions/ChangeOrder.axaml @@ -0,0 +1,11 @@ +<Window 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="demo_blagodat.ChangeOrder" + Title="Изменить заказ"> + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <Button Content="Назад" Click="ExitClik"/> + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/ChangeOrder.axaml.cs b/demo_blagodat/Functions/ChangeOrder.axaml.cs new file mode 100644 index 0000000..20d32a9 --- /dev/null +++ b/demo_blagodat/Functions/ChangeOrder.axaml.cs @@ -0,0 +1,43 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; + +namespace demo_blagodat; + +public partial class ChangeOrder : Window +{ + public Employee User; + public ChangeOrder(Employee user) + { + InitializeComponent(); + User = user; + } + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + Close(); + } + + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/ChangeServices.axaml b/demo_blagodat/Functions/ChangeServices.axaml new file mode 100644 index 0000000..516f0cf --- /dev/null +++ b/demo_blagodat/Functions/ChangeServices.axaml @@ -0,0 +1,62 @@ +<Window 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="demo_blagodat.ChangeServices" + Title="Изменить услугу"> + <StackPanel Spacing="15" Orientation="Vertical"> + <TextBlock Text="Введите код сервиса:"/> + <TextBox x:Name="Name"/> + + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите название услуги"/> + <TextBox Width="300" x:Name="TextNewName" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите код услуги"/> + <TextBox Width="300" x:Name="TextNewCode" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите цену в час"/> + <TextBox Width="300" x:Name="TextNewPrice" Text=""/> + </StackPanel> + + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Изменить данные Клиента" Click="changeClient"/> + <Button Content="Отчислить данные" Click="clear"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesAddError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesAdd" Text="" Foreground="Green"/> + </StackPanel> + + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Название услуги"/> + <TextBlock Width="300" x:Name="SelectName"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Код услуги"/> + <TextBlock Width="300" x:Name="SelectCode"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Цена услуги в час"/> + <TextBlock Width="300" x:Name="SelectPrice"/> + </StackPanel> + + </StackPanel> + + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/ChangeServices.axaml.cs b/demo_blagodat/Functions/ChangeServices.axaml.cs new file mode 100644 index 0000000..0f8e661 --- /dev/null +++ b/demo_blagodat/Functions/ChangeServices.axaml.cs @@ -0,0 +1,154 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System.Linq; +using System; + +namespace demo_blagodat; + +public partial class ChangeServices : Window +{ + public Employee User; + public ChangeServices(Employee user) + { + InitializeComponent(); + User = user; + } + + private void changeClient(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + // ���������� ����������� ������������ + string? name = Name.Text; + + // �������� ��� ������ � ������ + string? newname = TextNewName.Text; + string? newcode = TextNewCode.Text; + decimal? newprice = Math.Round(decimal.TryParse(TextNewPrice.Text.Replace(".", ","), out decimal resalt) ? resalt : -1 , 2); + + + if (name != "") + { + using (User11Context db = new User11Context()) // ����������� � �� + { + Service? service = db.Services.Where(it => it.ServiceName == name).FirstOrDefault(); + if (service != null) + { + if (TextNewName.Text != "") + { + service.ServiceName = newname; // ������ �������� "��������" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (TextNewCode.Text != "") + { + service.ServiceCode = newcode; // ������ �������� "���" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + + if (newprice == -1) + { + // ��������� + MesAdd.Text = ""; + MesAddError.Text = "������������ ����"; + } + else if (TextNewPrice.Text != "") + { + service.ServiceCostPerHour = (decimal) newprice;// ������ �������� "���� � ����" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + + if(TextNewName.Text == "" && TextNewCode.Text == "" && TextNewPrice.Text == "") + { + // ��������� + MesAdd.Text = ""; + MesAddError.Text = "������� ����� ������"; + } + check(service); + } + else + { + MesAdd.Text = ""; + MesAddError.Text = "������ ������� ���"; + } + } + } + else + { + MesAddError.Text = "������� ���������� ���������� ������"; + } + + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); // ������� ��������� �� ������ � ������� + + // ������ ��������� + MesAdd.Text = ""; + MesAddError.Text = "��������� ������"; + } + } + + private void clear(object sender, RoutedEventArgs e) + { + TextNewName.Text = ""; + TextNewCode.Text = ""; + TextNewPrice.Text = ""; + } + + private void check(Service service) + { + using (User11Context db = new User11Context()) // ����������� � �� + { + Service checkService = db.Services.Where(it => it.ServiceName == service.ServiceName).FirstOrDefault(); + + SelectName.Text = checkService.ServiceName; + SelectCode.Text = checkService.ServiceCode; + SelectPrice.Text = checkService.ServiceCostPerHour.ToString(); + } + } + + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + Close(); + } + + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/ChangeYourSelf.axaml b/demo_blagodat/Functions/ChangeYourSelf.axaml new file mode 100644 index 0000000..111390b --- /dev/null +++ b/demo_blagodat/Functions/ChangeYourSelf.axaml @@ -0,0 +1,62 @@ +<Window 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="demo_blagodat.ChangeYourSelf" + Title="Изменить свои данные"> + <StackPanel Spacing="15" Orientation="Vertical"> + + + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите новое ФИО"/> + <TextBox Width="300" x:Name="TextNewName" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите новый логин"/> + <TextBox Width="300" x:Name="TextNewLogin" Text=""/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите новый пароль"/> + <TextBox Width="300" x:Name="TextNewPassword" Text=""/> + </StackPanel> + + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Изменить свои данные" Click="changeYourSelf"/> + <Button Content="Отчислить данные" Click="clear"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesAddError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesAdd" Text="" Foreground="Green"/> + </StackPanel> + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Horizontal"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="ФИО"/> + <TextBlock Width="300" x:Name="SelectName"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Логин"/> + <TextBlock Width="300" x:Name="SelectLogin"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Пароль"/> + <TextBlock Width="300" x:Name="SelectPassword"/> + </StackPanel> + + + </StackPanel> + + + + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/ChangeYourSelf.axaml.cs b/demo_blagodat/Functions/ChangeYourSelf.axaml.cs new file mode 100644 index 0000000..daefd68 --- /dev/null +++ b/demo_blagodat/Functions/ChangeYourSelf.axaml.cs @@ -0,0 +1,133 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System; +using System.Linq; + +namespace demo_blagodat; + +public partial class ChangeYourSelf : Window +{ + public Employee User; + public ChangeYourSelf(Employee user) + { + InitializeComponent(); + User = user; + check(user); + } + + private void changeYourSelf(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + // �������� ��� ������ � ������ + string? newname = TextNewName.Text; + string? newlogin = TextNewLogin.Text; + string? newpassword = TextNewPassword.Text; + + using (User11Context db = new User11Context()) // ����������� � �� + { + Employee I = db.Employees.Where(it => it.EmployeesLogin == User.EmployeesLogin).FirstOrDefault(); + if (TextNewName.Text != "") + { + I.EmployeesName = newname; // ������ �������� "���" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (TextNewPassword.Text != "") + { + I.EmployeesPassword = newpassword; // ������ �������� "������" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (TextNewLogin.Text != "") + { + I.EmployeesLogin = newlogin; // ������ �������� "�����" + + db.SaveChanges(); // ��������� ��������� + + // ��������� + MesAdd.Text = "������ ��������"; + MesAddError.Text = ""; + } + if (TextNewName.Text != "" && TextNewLogin.Text != "" && TextNewPassword.Text != "") + { + // ��������� + MesAdd.Text = ""; + MesAddError.Text = "������� ����� ������"; + } + check(I); + } + + } + catch (Exception ex) + { + Console.WriteLine(ex.Message); // ������� ��������� �� ������ � ������� + + // ������ ��������� + MesAdd.Text = ""; + MesAddError.Text = "��������� ������"; + } + } + + private void clear(object sender, RoutedEventArgs e) + { + TextNewName.Text = ""; + TextNewLogin.Text = ""; + TextNewPassword.Text = ""; + } + + private void check(Employee I) + { + using(User11Context db = new User11Context()) // ����������� � �� + { + + Employee checkMe = db.Employees.Where(it => it.EmployeesLogin == I.EmployeesLogin).FirstOrDefault(); + + SelectName.Text = checkMe.EmployeesName; + + SelectPassword.Text = checkMe.EmployeesPassword; + + SelectLogin.Text = checkMe.EmployeesLogin; + + User = I; + } + } + + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + Close(); + } + + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/DeleteClient.axaml b/demo_blagodat/Functions/DeleteClient.axaml new file mode 100644 index 0000000..6c636aa --- /dev/null +++ b/demo_blagodat/Functions/DeleteClient.axaml @@ -0,0 +1,32 @@ +<Window 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="demo_blagodat.DeleteClient" + Title="Удалить клиента"> + <StackPanel Orientation="Vertical"> + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Vertical"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите ФИО"/> + <TextBox Width="300" x:Name="TextName"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите Паспорт"/> + <TextBox Width="300" x:Name="TextPassport"/> + </StackPanel> + + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Удвлить Клиента" Click="deleteclient"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesDelError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesDel" Text="" Foreground="Green"/> + </StackPanel> + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/DeleteClient.axaml.cs b/demo_blagodat/Functions/DeleteClient.axaml.cs new file mode 100644 index 0000000..78fe8b6 --- /dev/null +++ b/demo_blagodat/Functions/DeleteClient.axaml.cs @@ -0,0 +1,101 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System; +using System.Linq; + +namespace demo_blagodat; + +public partial class DeleteClient : Window +{ + public Employee User; + public DeleteClient(Employee user) + { + InitializeComponent(); + User = user; + } + private void deleteclient(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + using (User11Context db = new User11Context()) // ����������� � �� + { + // �������� ��� ������ � ������ + string? name = TextName.Text; + //string pas = TextPassport.Text; + + + if (name != null) // ��������� ������� ������ ������ + { + Client? client = db.Clients.Where(it => it.ClientName == name).FirstOrDefault(); // ������ ��������� ������ Client + + if (client != null) + { + // ������� ������������ �� �� + db.Clients.Remove(client); + + // ��������� ��������� �� + db.SaveChanges(); + + // ������ ��������� + MesDelError.Text = ""; + MesDel.Text = "������ �����"; + } + else + { + MesDel.Text = "������ ������� ���"; + } + + // ������� ��� ������ + TextName.Text = ""; + TextPassport.Text = ""; + } + else + { + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "����� �������� ��� ������ �������!\n����� ������������ ������ �����."; + } + } + } + catch (Exception ex) + { + // ������� ��������� �� ������ � ������� + Console.WriteLine(ex.Message); + + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "��������� ������"; + } + + } + + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) // �������� ������������ + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + } + + // ��������� ������ ��� ����������� � ������ ���� ������������ + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/DeleteEmployee.axaml b/demo_blagodat/Functions/DeleteEmployee.axaml new file mode 100644 index 0000000..ee58c70 --- /dev/null +++ b/demo_blagodat/Functions/DeleteEmployee.axaml @@ -0,0 +1,26 @@ +<Window 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="demo_blagodat.DeleteEmployee" + Title="DeleteEmployee"> + <StackPanel Orientation="Vertical"> + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Vertical"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите Логин "/> + <TextBox Width="300" x:Name="TextLogin"/> + </StackPanel> + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Удвлить Сотрудника" Click="deleteEmployee"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesDelError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesDel" Text="" Foreground="Green"/> + </StackPanel> + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/DeleteEmployee.axaml.cs b/demo_blagodat/Functions/DeleteEmployee.axaml.cs new file mode 100644 index 0000000..d142d4f --- /dev/null +++ b/demo_blagodat/Functions/DeleteEmployee.axaml.cs @@ -0,0 +1,79 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System; +using System.Linq; + +namespace demo_blagodat; + +public partial class DeleteEmployee : Window +{ + public Employee User; + public DeleteEmployee(Employee user) + { + InitializeComponent(); + User = user; + } + + private void deleteEmployee(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + using (User11Context db = new User11Context()) // ����������� � �� + { + // �������� ��� ������ � ������ + string? login = TextLogin.Text; + + if (login != null) // ��������� ������� ������ ������ + { + Employee? employee = db.Employees.Where(it => it.EmployeesLogin == login).FirstOrDefault();// ������ ��������� ������ Client + + if (employee != null) + { + // ������� ������������ �� �� + db.Employees.Remove(employee); + + // ��������� ��������� �� + db.SaveChanges(); + + // ������ ��������� + MesDelError.Text = ""; + MesDel.Text = "��������� �����"; + TextLogin.Text = ""; + } + else + { + MesDel.Text = ""; + MesDelError.Text = "������ ���������� ���"; + } + + + } + else + { + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "����� ������ ����� ����������"; + } + } + } + catch (Exception ex) + { + // ������� ��������� �� ������ � ������� + Console.WriteLine(ex.Message); + + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "��������� ������"; + } + + } + + private void ExitClik(object sender, RoutedEventArgs e) + { + new Admin(User).Show(); + Close(); + } +} diff --git a/demo_blagodat/Functions/DeleteOrder.axaml b/demo_blagodat/Functions/DeleteOrder.axaml new file mode 100644 index 0000000..1fb8da3 --- /dev/null +++ b/demo_blagodat/Functions/DeleteOrder.axaml @@ -0,0 +1,27 @@ +<Window 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="demo_blagodat.DeleteOrder" + Title="DeleteOrder"> + <StackPanel Orientation="Vertical"> + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Vertical"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите ID заказа"/> + <TextBox Width="300" x:Name="TextID"/> + </StackPanel> + + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Удвлить Клиента" Click="deleteclient"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesDelError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesDel" Text="" Foreground="Green"/> + </StackPanel> + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/DeleteOrder.axaml.cs b/demo_blagodat/Functions/DeleteOrder.axaml.cs new file mode 100644 index 0000000..3761e9a --- /dev/null +++ b/demo_blagodat/Functions/DeleteOrder.axaml.cs @@ -0,0 +1,100 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System.Linq; +using System; + +namespace demo_blagodat; + +public partial class DeleteOrder : Window +{ + public Employee User; + public DeleteOrder(Employee user) + { + InitializeComponent(); + User = user; + } + private void deleteclient(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + using (User11Context db = new User11Context()) // ����������� � �� + { + // �������� ��� ������ � ������ + int? id = int.Parse(TextID.Text); + + + if (id != null) // ��������� ������� ������ ������ + { + Order? order = db.Orders.Where(it => it.OrderId == id).FirstOrDefault(); // ������ ��������� ������ Order + + if (order != null) + { + // ������� ����� �� �� + db.Orders.Remove(order); + + // ��������� ��������� �� + db.SaveChanges(); + + // ������ ��������� + MesDelError.Text = ""; + MesDel.Text = "����� �����"; + } + else + { + MesDel.Text = "������ ������ ���"; + } + + // ������� ��� ������ + TextID.Text = ""; + + } + else + { + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "����� �������� ID."; + } + } + } + catch (Exception ex) + { + // ������� ��������� �� ������ � ������� + Console.WriteLine(ex.Message); + + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "��������� ������"; + } + + } + + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) // �������� ������������ + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + } + + // ��������� ������ ��� ����������� � ������ ���� ������������ + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/DeleteServices.axaml b/demo_blagodat/Functions/DeleteServices.axaml new file mode 100644 index 0000000..8686201 --- /dev/null +++ b/demo_blagodat/Functions/DeleteServices.axaml @@ -0,0 +1,33 @@ +<Window 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="demo_blagodat.DeleteServices" + Title="Удалить Сервис"> + <StackPanel Orientation="Vertical"> + <StackPanel Spacing="15" HorizontalAlignment="Center" Orientation="Vertical"> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите название"/> + <TextBox Width="300" x:Name="TextName"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <TextBlock Text="Введите код услуги"/> + <TextBox Width="300" x:Name="TextCode"/> + </StackPanel> + + </StackPanel> + + <StackPanel HorizontalAlignment="Center" Orientation="Vertical" VerticalAlignment="Center"> + <Button Content="Удвлить Сервис" Click="deleteclient"/> + <Button Content="Вернуться назад" Click="ExitClik"/> + </StackPanel> + <StackPanel HorizontalAlignment="Center" Orientation="Vertical"> + <TextBlock x:Name="MesDelError" Text="" Foreground="Red"/> + <TextBlock x:Name="MesDel" Text="" Foreground="Green"/> + </StackPanel> + + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/DeleteServices.axaml.cs b/demo_blagodat/Functions/DeleteServices.axaml.cs new file mode 100644 index 0000000..9d5c81e --- /dev/null +++ b/demo_blagodat/Functions/DeleteServices.axaml.cs @@ -0,0 +1,102 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System.Linq; +using System; + +namespace demo_blagodat; + +public partial class DeleteServices : Window +{ + public Employee User; + public DeleteServices(Employee user) + { + InitializeComponent(); + User = user; + } + + private void deleteclient(object sender, RoutedEventArgs e) + { + try // ����������� ��� ��������� ���������� + { + using (User11Context db = new User11Context()) // ����������� � �� + { + // �������� ������ � ������ + string? name = TextName.Text; + string? code = TextCode.Text; + + if (name != null) // ��������� ������� ������ ������ + { + Service? service = db.Services.Where(it => it.ServiceName == name).FirstOrDefault(); // ������ ��������� ������ Service + + if (service != null) + { + // ������� ������������ �� �� + db.Services.Remove(service); + + // ��������� ��������� �� + db.SaveChanges(); + + // ������ ��������� + MesDelError.Text = ""; + MesDel.Text = "������ �����"; + } + else + { + MesDel.Text = "������ ������� ���"; + } + + // ������� ��� ������ + TextName.Text = ""; + } + else + { + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "����� �������� �������� ��� ���!"; + } + } + } + catch (Exception ex) + { + // ������� ��������� �� ������ � ������� + Console.WriteLine(ex.Message); + + // ������ ��������� + MesDel.Text = ""; + MesDelError.Text = "��������� ������"; + } + + } + + + // ����� + private void ExitClik(object sender, RoutedEventArgs e) + { + switch (User.EmployeesPosition) // �������� ������������ + { + case "�������������": AdminOneClikc(User); break; + case "��������": SellerOneClikc(User); break; + case "������� �����": ShiftSupervisorOneClikc(User); break; + } + } + + // ��������� ������ ��� ����������� � ������ ���� ������������ + private void SellerOneClikc(Employee User) + { + new Seller(User).Show(); + Close(); + } + private void AdminOneClikc(Employee User) + { + new Admin(User).Show(); + Close(); + } + private void ShiftSupervisorOneClikc(Employee User) + { + new ShiftSupervisor(User).Show(); + Close(); + } +} \ No newline at end of file diff --git a/demo_blagodat/Functions/Heir.axaml b/demo_blagodat/Functions/Heir.axaml new file mode 100644 index 0000000..72cacc1 --- /dev/null +++ b/demo_blagodat/Functions/Heir.axaml @@ -0,0 +1,22 @@ +<Window 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="demo_blagodat.Heir" + Title="Наследник"> + <StackPanel Spacing="15" Orientation="Vertical"> + <TextBlock Text="Введите Логин сотрудника, которому хотите передать полномочия"/> + <TextBox x:Name="Login"/> + <TextBlock x:Name="Position" Text="Выберите себе новую должность: "/> + + <StackPanel Orientation="Horizontal"> + <Button Content="Продавец" Click="NewPositionSeller"/> + <Button Content="Старший смены" Click="NewPositionSS"/> + </StackPanel> + + <Button Content="Передать" Click="heir"/> + <Button Content="Назад" Click="ExitClick"/> + <TextBlock x:Name="MessError" Text="" Foreground="Red"/> + </StackPanel> +</Window> diff --git a/demo_blagodat/Functions/Heir.axaml.cs b/demo_blagodat/Functions/Heir.axaml.cs new file mode 100644 index 0000000..d16775d --- /dev/null +++ b/demo_blagodat/Functions/Heir.axaml.cs @@ -0,0 +1,87 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Interactivity; +using Avalonia.Markup.Xaml; +using demo_blagodat.Models; +using System; +using System.Linq; +using Tmds.DBus.Protocol; + +namespace demo_blagodat; + +public partial class Heir : Window +{ + public Employee User; + public string position = ""; + public Heir(Employee user) + { + InitializeComponent(); + User = user; + } + + private void NewPositionSeller(object sender, RoutedEventArgs e) + { + Position.Text = "�������� ���� ����� ���������: ��������"; + position = "��������"; + } + + private void NewPositionSS(object sender, RoutedEventArgs e) + { + Position.Text = "�������� ���� ����� ���������: ������� �����"; + position = "������� �����"; + } + + private void heir(object sender, RoutedEventArgs e) + { + try + { + if (Login.Text != "") + { + using (User11Context db = new User11Context()) + { + Employee employee = db.Employees.Where(it => it.EmployeesLogin == Login.Text).FirstOrDefault(); + if (employee != null) + { + if(position != "") + { + employee.EmployeesPosition = "�������������"; + db.SaveChanges(); + + Employee I = db.Employees.Where(it => it.EmployeesLogin == User.EmployeesLogin).FirstOrDefault(); + I.EmployeesPosition = position; + I.EmployeesEntrance = false; + db.SaveChanges(); + + new Authorization().Show(); + Close(); + } + else + { + MessError.Text = "�������� ���� ����� ���������"; + } + } + else + { + MessError.Text = "������ ���������� �� ����������."; + } + } + } + else + { + MessError.Text = "������� ��� ������ ������"; + } + } + catch(Exception ex) + { + Console.WriteLine(ex.Message); + MessError.Text = "��������� ������"; + } + } + + + private void ExitClick(object sender, RoutedEventArgs e) + { + new Admin(User).Show(); + Close(); + } +} diff --git a/demo_blagodat/Users/Admin.axaml b/demo_blagodat/Users/Admin.axaml index c598502..5e31c81 100644 --- a/demo_blagodat/Users/Admin.axaml +++ b/demo_blagodat/Users/Admin.axaml @@ -16,13 +16,32 @@ <TextBlock x:Name="Userposition" Text="Ваша должность: "/> </StackPanel> <TextBlock Text="Доступные функции" HorizontalAlignment="Center"/> - <StackPanel Orientation="Horizontal"> - <Button Content="Выход" Click="ExitAuthorization"/> - <Button Content="Выход из приложения" Click="Exit"/> - <Button Content="Добавить клиента" Click="addClient"/> - <Button Content="Сформировать заказ" Click="createOrder"/> - <Button Content="Добавить услугу" Click="addServices"/> - <Button Content="Удалить заказ" /> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"> + <Button Content="Добавить клиента" Click="addClient"/> + <Button Content="Удалить клиента" Click="deleteClient"/> + <Button Content="Изменить клиента" Click="changeClient"/> + </StackPanel> + + <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"> + <Button Content="Добавить услугу" Click="addServices"/> + <Button Content="Удалить услугу" Click="deleteServices"/> + <Button Content="Изменить услугу" Click="changeServices"/> + </StackPanel> + + <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"> + <Button Content="Добавить заказ" Click="createOrder"/> + <Button Content="Удалить заказ" Click="deleteOrder"/> + <Button Content="Изменить заказ" Click="changeOrder"/> + </StackPanel> + + <StackPanel Orientation="Vertical" HorizontalAlignment="Stretch"> + <Button Content="Передать должность" Click="heir"/> + <Button Content="Выход из приложения" Click="Exit"/> + <Button Content="Выход в авторизацию" Click="ExitAuthorization"/> + <Button Content="Удалить сотрудника" Click="deleteEmployee"/> + <Button Content="Изменить свои данные" Click="changeYourSelf"/> + </StackPanel> </StackPanel> </StackPanel> </StackPanel> diff --git a/demo_blagodat/Users/Admin.axaml.cs b/demo_blagodat/Users/Admin.axaml.cs index 9dfe802..c6a4233 100644 --- a/demo_blagodat/Users/Admin.axaml.cs +++ b/demo_blagodat/Users/Admin.axaml.cs @@ -29,6 +29,12 @@ public partial class Admin : Window Userposition.Text = Userposition.Text + User.EmployeesPosition; } + private void heir(object sender, RoutedEventArgs e) + { + new Heir(User).Show(); + Close(); // ��������� ������� ���� + } + // ����� � ���� ����������� private void ExitAuthorization(object sender, RoutedEventArgs e) { @@ -43,6 +49,17 @@ public partial class Admin : Window Close(); } + // ����� ��� ���������� ���������� �� false + private void activityUpdate() + { + using (User11Context db = new User11Context()) // ����������� � �� + { + var corrUser = db.Employees.Where(x => x.EmployeesLogin == User.EmployeesLogin).FirstOrDefault(); + corrUser.EmployeesEntrance = false; // ������ � ��������� "����������" True �� False + db.SaveChanges(); // ��������� ��������� � �� + } + } + // ������ �������� � ���� �������� ������� private void createOrder(object sender, RoutedEventArgs e) { @@ -63,14 +80,51 @@ public partial class Admin : Window Close(); } - // ����� ��� ���������� ���������� �� false - private void activityUpdate() + private void deleteClient(object sender, RoutedEventArgs e) { - using (User11Context db = new User11Context()) // ����������� � �� - { - var corrUser = db.Employees.Where(x => x.EmployeesLogin == User.EmployeesLogin).FirstOrDefault(); - corrUser.EmployeesEntrance = false; // ������ � ��������� "����������" True �� False - db.SaveChanges(); // ��������� ��������� � �� - } + new DeleteClient(User).Show(); + Close(); + } + + private void deleteServices(object sender, RoutedEventArgs e) + { + new DeleteServices(User).Show(); + Close(); + } + + private void deleteOrder(object sender, RoutedEventArgs e) + { + new DeleteServices(User).Show(); + Close(); + } + + private void changeOrder(object sender, RoutedEventArgs e) + { + new ChangeOrder(User).Show(); + Close(); + } + + private void changeServices(object sender, RoutedEventArgs e) + { + new ChangeServices(User).Show(); + Close(); + } + + private void changeClient(object sender, RoutedEventArgs e) + { + new ChangeClient(User).Show(); + Close(); + } + + private void deleteEmployee(object sender, RoutedEventArgs e) + { + new DeleteEmployee(User).Show(); + Close(); + } + + private void changeYourSelf(object sender, RoutedEventArgs e) + { + new ChangeYourSelf(User).Show(); + Close(); } } diff --git a/demo_blagodat/Users/Seller.axaml b/demo_blagodat/Users/Seller.axaml index 6946f92..738e116 100644 --- a/demo_blagodat/Users/Seller.axaml +++ b/demo_blagodat/Users/Seller.axaml @@ -16,12 +16,28 @@ <TextBlock x:Name="Userposition" Text="Ваша должность: "/> </StackPanel> <TextBlock Text="Доступные функции" HorizontalAlignment="Center"/> - <StackPanel Orientation="Horizontal"> - <Button Content="Сформировать заказ" Click="createOrder"/> - <Button Content="Выход" Click="ExitAuthorization"/> - <Button Content="Выход из приложения" Click="Exit"/> - <Button Content="Добавить клиента" Click="addClient"/> - <Button Content="Добавить услугу" Click="addServices"/> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> + <StackPanel Orientation="Vertical"> + <Button Content="Добавить клиента" Click="addClient"/> + <Button Content="Удалить клиента" Click="deleteClient"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <Button Content="Добавить услугу" Click="addServices"/> + <Button Content="Удалить услугу" /> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <Button Content="Добавить заказ" Click="createOrder"/> + <Button Content="Удалить заказ" /> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <Button Content="Выход из приложения" Click="Exit"/> + <Button Content="Выход" Click="ExitAuthorization"/> + </StackPanel> + </StackPanel> </StackPanel> </StackPanel> </StackPanel> diff --git a/demo_blagodat/Users/Seller.axaml.cs b/demo_blagodat/Users/Seller.axaml.cs index fb25bb7..b9d818b 100644 --- a/demo_blagodat/Users/Seller.axaml.cs +++ b/demo_blagodat/Users/Seller.axaml.cs @@ -58,6 +58,12 @@ public partial class Seller : Window Close(); // ��������� ������� ���� } + private void deleteClient(object sender, RoutedEventArgs e) + { + new DeleteClient(User).Show(); + Close(); + } + private void activityUpdate() { using (User11Context db = new User11Context()) // ����������� � �� diff --git a/demo_blagodat/Users/ShiftSupervisor.axaml b/demo_blagodat/Users/ShiftSupervisor.axaml index 877af7e..8f36438 100644 --- a/demo_blagodat/Users/ShiftSupervisor.axaml +++ b/demo_blagodat/Users/ShiftSupervisor.axaml @@ -17,11 +17,20 @@ </StackPanel> <TextBlock Text="Доступные функции" HorizontalAlignment="Center"/> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> - <Button Content="сформировать заказ" Click="createOrder"/> - <Button Content="Добавить пользователя" Click="addClient"/> - <Button Content="принять товар"/> - <Button Content="Выход из приложения" Click="Exit"/> - <Button Content="Выход" Click="ExitAuthorization"/> + <StackPanel Orientation="Vertical"> + <Button Content="Добавить клиента" Click="addClient"/> + <Button Content="Удалить клиента" Click="deleteClient"/> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <Button Content="Добавить заказ" Click="createOrder"/> + <Button Content="Удалить заказ" /> + </StackPanel> + + <StackPanel Orientation="Vertical"> + <Button Content="Выход из приложения" Click="Exit"/> + <Button Content="Выход" Click="ExitAuthorization"/> + </StackPanel> </StackPanel> </StackPanel> </StackPanel> diff --git a/demo_blagodat/Users/ShiftSupervisor.axaml.cs b/demo_blagodat/Users/ShiftSupervisor.axaml.cs index d9bbcb2..51b4227 100644 --- a/demo_blagodat/Users/ShiftSupervisor.axaml.cs +++ b/demo_blagodat/Users/ShiftSupervisor.axaml.cs @@ -58,4 +58,9 @@ public partial class ShiftSupervisor : Window new AddClient(User).Show(); Close(); // ��������� ������� ���� } + private void deleteClient(object sender, RoutedEventArgs e) + { + new DeleteClient(User).Show(); + Close(); + } } \ No newline at end of file diff --git a/demo_blagodat/bin/Debug/net8.0/demo_blagodat.dll b/demo_blagodat/bin/Debug/net8.0/demo_blagodat.dll index 0317af4..7b857d8 100644 Binary files a/demo_blagodat/bin/Debug/net8.0/demo_blagodat.dll and b/demo_blagodat/bin/Debug/net8.0/demo_blagodat.dll differ diff --git a/demo_blagodat/bin/Debug/net8.0/demo_blagodat.exe b/demo_blagodat/bin/Debug/net8.0/demo_blagodat.exe index 5b4f441..e8429d5 100644 Binary files a/demo_blagodat/bin/Debug/net8.0/demo_blagodat.exe and b/demo_blagodat/bin/Debug/net8.0/demo_blagodat.exe differ diff --git a/demo_blagodat/bin/Debug/net8.0/demo_blagodat.pdb b/demo_blagodat/bin/Debug/net8.0/demo_blagodat.pdb index b2f9ac6..b4bafe4 100644 Binary files a/demo_blagodat/bin/Debug/net8.0/demo_blagodat.pdb and b/demo_blagodat/bin/Debug/net8.0/demo_blagodat.pdb differ diff --git a/demo_blagodat/demo_blagodat.csproj b/demo_blagodat/demo_blagodat.csproj index df4c31d..c30d638 100644 --- a/demo_blagodat/demo_blagodat.csproj +++ b/demo_blagodat/demo_blagodat.csproj @@ -25,4 +25,10 @@ </PackageReference> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.10" /> </ItemGroup> + + <ItemGroup> + <Compile Update="Functions\AddOrder.axaml.cs"> + <DependentUpon>AddOrder.axaml</DependentUpon> + </Compile> + </ItemGroup> </Project> diff --git a/demo_blagodat/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache b/demo_blagodat/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache index f8f3a75..ed99c6c 100644 --- a/demo_blagodat/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache +++ b/demo_blagodat/obj/Debug/net8.0/Avalonia/Resources.Inputs.cache @@ -1 +1 @@ -2be621f199d7e2a203d693ae6f5fff0625d5a2932fb1fc10452e2ec3e6444158 +ab5ec113c47cd0ed26726b590fad36b7976ff45256224af52e4ecd17831cc634 diff --git a/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.dll b/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.dll index 0317af4..7b857d8 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.dll and b/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.dll differ diff --git a/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.pdb b/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.pdb index b2f9ac6..b4bafe4 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.pdb and b/demo_blagodat/obj/Debug/net8.0/Avalonia/demo_blagodat.pdb differ diff --git a/demo_blagodat/obj/Debug/net8.0/Avalonia/resources b/demo_blagodat/obj/Debug/net8.0/Avalonia/resources index 14cb268..179a265 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/Avalonia/resources and b/demo_blagodat/obj/Debug/net8.0/Avalonia/resources differ diff --git a/demo_blagodat/obj/Debug/net8.0/apphost.exe b/demo_blagodat/obj/Debug/net8.0/apphost.exe index 5b4f441..e8429d5 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/apphost.exe and b/demo_blagodat/obj/Debug/net8.0/apphost.exe differ diff --git a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfo.cs b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfo.cs index 404f2b5..7fbbf4d 100644 --- a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfo.cs +++ b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("demo_blagodat")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bf2aa0e8fea7c15adaa02c2776b3d962a64d8238")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+62a5c37073e8de050b3ef6eac3fb262f6ca7c0f9")] [assembly: System.Reflection.AssemblyProductAttribute("demo_blagodat")] [assembly: System.Reflection.AssemblyTitleAttribute("demo_blagodat")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfoInputs.cache b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfoInputs.cache index 9c1fb56..ee00524 100644 --- a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfoInputs.cache +++ b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.AssemblyInfoInputs.cache @@ -1 +1 @@ -c5d4e7921b679a2380e31fa33a79d982d08a3ac86ee1a7bb5fda26b1f08fd78e +15c2bfa45e197aa1289a0c26d723f2a088b9752d4152eedee31e9c27fdbc6bfd diff --git a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.GeneratedMSBuildEditorConfig.editorconfig b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.GeneratedMSBuildEditorConfig.editorconfig index 05c7cb5..d06449e 100644 --- a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.GeneratedMSBuildEditorConfig.editorconfig +++ b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.GeneratedMSBuildEditorConfig.editorconfig @@ -24,19 +24,46 @@ build_property.EnableCodeStyleSeverity = [C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/App.axaml] build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml -[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Authorization.axaml] +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Entry/Authorization.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Entry/Registration.axaml] build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml [C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/AddClient.axaml] build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/AddOrder.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + [C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/AddServices.axaml] build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml -[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/CreateOrder.axaml] +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/ChangeClient.axaml] build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml -[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Registration.axaml] +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/ChangeOrder.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/ChangeServices.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/ChangeYourSelf.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/DeleteClient.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/DeleteEmployee.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/DeleteOrder.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/DeleteServices.axaml] +build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml + +[C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Functions/Heir.axaml] build_metadata.AdditionalFiles.SourceItemGroup = AvaloniaXaml [C:/Users/VivoBook 15X/Desktop/программные модули/Demo_Blagodat/demo_blagodat/demo_blagodat/Users/Admin.axaml] diff --git a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.csproj.CoreCompileInputs.cache b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.csproj.CoreCompileInputs.cache index 9878d44..08010de 100644 --- a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.csproj.CoreCompileInputs.cache +++ b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -9e71e112725c9a716a2103cd3fd384cd298c46c7c9feef916663171f7912498b +6ba8676dd6ba41f96d33829d1624eddf4ac85ba70d5c98b0486290d37753fec9 diff --git a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.dll b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.dll index fe31dc6..e6c90db 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.dll and b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.dll differ diff --git a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.pdb b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.pdb index 12ea638..0775cdf 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/demo_blagodat.pdb and b/demo_blagodat/obj/Debug/net8.0/demo_blagodat.pdb differ diff --git a/demo_blagodat/obj/Debug/net8.0/ref/demo_blagodat.dll b/demo_blagodat/obj/Debug/net8.0/ref/demo_blagodat.dll index 745c3f1..dadda80 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/ref/demo_blagodat.dll and b/demo_blagodat/obj/Debug/net8.0/ref/demo_blagodat.dll differ diff --git a/demo_blagodat/obj/Debug/net8.0/refint/Avalonia/demo_blagodat.dll b/demo_blagodat/obj/Debug/net8.0/refint/Avalonia/demo_blagodat.dll index 745c3f1..dadda80 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/refint/Avalonia/demo_blagodat.dll and b/demo_blagodat/obj/Debug/net8.0/refint/Avalonia/demo_blagodat.dll differ diff --git a/demo_blagodat/obj/Debug/net8.0/refint/demo_blagodat.dll b/demo_blagodat/obj/Debug/net8.0/refint/demo_blagodat.dll index 6fd2728..a6ca15d 100644 Binary files a/demo_blagodat/obj/Debug/net8.0/refint/demo_blagodat.dll and b/demo_blagodat/obj/Debug/net8.0/refint/demo_blagodat.dll differ