4 Commits b48258d319 ... 0641e3bbe3

Auteur SHA1 Message Date
  Weddien 0641e3bbe3 fix il y a 1 semaine
  Weddien 8314300d9a Initial commit il y a 1 semaine
  Weddien 32f8352378 Добавьте файлы проекта. il y a 2 mois
  Weddien f735626f31 Добавить .gitattributes и .gitignore. il y a 2 mois
61 fichiers modifiés avec 9078 ajouts et 18 suppressions
  1. 63 0
      .gitattributes
  2. 157 18
      .gitignore
  3. 289 0
      AddressEditForm.Designer.cs
  4. 129 0
      AddressEditForm.cs
  5. 120 0
      AddressEditForm.resx
  6. 198 0
      AddressesForm.Designer.cs
  7. 205 0
      AddressesForm.cs
  8. 120 0
      AddressesForm.resx
  9. 33 0
      App.config
  10. 136 0
      AssignManagerForm.Designer.cs
  11. 108 0
      AssignManagerForm.cs
  12. 120 0
      AssignManagerForm.resx
  13. 233 0
      Bd.Designer.cs
  14. 291 0
      Bd.cs
  15. 120 0
      Bd.resx
  16. 129 0
      ChangeStatusForm.Designer.cs
  17. 136 0
      ChangeStatusForm.cs
  18. 120 0
      ChangeStatusForm.resx
  19. 227 0
      ClientEditForm.Designer.cs
  20. 121 0
      ClientEditForm.cs
  21. 120 0
      ClientEditForm.resx
  22. 180 0
      ClientsForm.Designer.cs
  23. 145 0
      ClientsForm.cs
  24. 120 0
      ClientsForm.resx
  25. 657 0
      DatabaseHelper.cs
  26. 166 0
      LoginForm.Designer.cs
  27. 60 0
      LoginForm.cs
  28. 120 0
      LoginForm.resx
  29. 162 0
      Main.Designer.cs
  30. 115 0
      Main.cs
  31. 120 0
      Main.resx
  32. 227 0
      ManagerEditForm.Designer.cs
  33. 119 0
      ManagerEditForm.cs
  34. 120 0
      ManagerEditForm.resx
  35. 180 0
      ManagersForm.Designer.cs
  36. 155 0
      ManagersForm.cs
  37. 120 0
      ManagersForm.resx
  38. 184 0
      NewRequestForm.Designer.cs
  39. 108 0
      NewRequestForm.cs
  40. 17 0
      Program.cs
  41. 33 0
      Properties/AssemblyInfo.cs
  42. 71 0
      Properties/Resources.Designer.cs
  43. 117 0
      Properties/Resources.resx
  44. 30 0
      Properties/Settings.Designer.cs
  45. 7 0
      Properties/Settings.settings
  46. 317 0
      RegisterForm.Designer.cs
  47. 178 0
      RegisterForm.cs
  48. 120 0
      RegisterForm.resx
  49. 335 0
      ReportForm.Designer.cs
  50. 227 0
      ReportForm.cs
  51. 120 0
      ReportForm.resx
  52. 216 0
      RequestsForm.Designer.cs
  53. 261 0
      RequestsForm.cs
  54. 120 0
      RequestsForm.resx
  55. 26 0
      Session.cs
  56. 121 0
      StartForm.Designer.cs
  57. 43 0
      StartForm.cs
  58. 120 0
      StartForm.resx
  59. 311 0
      WindowsFormsApp4.csproj
  60. 25 0
      WindowsFormsApp4.sln
  61. 30 0
      packages.config

+ 63 - 0
.gitattributes

@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs     diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following 
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln       merge=binary
+#*.csproj    merge=binary
+#*.vbproj    merge=binary
+#*.vcxproj   merge=binary
+#*.vcproj    merge=binary
+#*.dbproj    merge=binary
+#*.fsproj    merge=binary
+#*.lsproj    merge=binary
+#*.wixproj   merge=binary
+#*.modelproj merge=binary
+#*.sqlproj   merge=binary
+#*.wwaproj   merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg   binary
+#*.png   binary
+#*.gif   binary
+
+###############################################################################
+# diff behavior for common document formats
+# 
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the 
+# entries below.
+###############################################################################
+#*.doc   diff=astextplain
+#*.DOC   diff=astextplain
+#*.docx  diff=astextplain
+#*.DOCX  diff=astextplain
+#*.dot   diff=astextplain
+#*.DOT   diff=astextplain
+#*.pdf   diff=astextplain
+#*.PDF   diff=astextplain
+#*.rtf   diff=astextplain
+#*.RTF   diff=astextplain

+ 157 - 18
.gitignore

@@ -1,8 +1,10 @@
-# ---> VisualStudio
 ## Ignore Visual Studio temporary files, build results, and
 ## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
 
 # User-specific files
+*.rsuser
 *.suo
 *.user
 *.userosscache
@@ -11,6 +13,9 @@
 # User-specific files (MonoDevelop/Xamarin Studio)
 *.userprefs
 
+# Mono auto generated files
+mono_crash.*
+
 # Build results
 [Dd]ebug/
 [Dd]ebugPublic/
@@ -18,41 +23,63 @@
 [Rr]eleases/
 x64/
 x86/
-build/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
 bld/
 [Bb]in/
 [Oo]bj/
+[Oo]ut/
+[Ll]og/
+[Ll]ogs/
 
-# Visual Studio 2015 cache/options directory
+# Visual Studio 2015/2017 cache/options directory
 .vs/
 # Uncomment if you have tasks that create the project's static files in wwwroot
 #wwwroot/
 
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
 # MSTest test Results
 [Tt]est[Rr]esult*/
 [Bb]uild[Ll]og.*
 
-# NUNIT
+# NUnit
 *.VisualState.xml
 TestResult.xml
+nunit-*.xml
 
 # Build Results of an ATL Project
 [Dd]ebugPS/
 [Rr]eleasePS/
 dlldata.c
 
-# DNX
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
 project.lock.json
+project.fragment.lock.json
 artifacts/
 
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
 *_i.c
 *_p.c
-*_i.h
+*_h.h
 *.ilk
 *.meta
 *.obj
+*.iobj
 *.pch
 *.pdb
+*.ipdb
 *.pgc
 *.pgd
 *.rsp
@@ -62,6 +89,7 @@ artifacts/
 *.tlh
 *.tmp
 *.tmp_proj
+*_wpftmp.csproj
 *.log
 *.vspscc
 *.vssscc
@@ -77,9 +105,12 @@ _Chutzpah*
 ipch/
 *.aps
 *.ncb
+*.opendb
 *.opensdf
 *.sdf
 *.cachefile
+*.VC.db
+*.VC.VC.opendb
 
 # Visual Studio profiler
 *.psess
@@ -87,6 +118,9 @@ ipch/
 *.vspx
 *.sap
 
+# Visual Studio Trace Files
+*.e2e
+
 # TFS 2012 Local Workspace
 $tf/
 
@@ -98,15 +132,25 @@ _ReSharper*/
 *.[Rr]e[Ss]harper
 *.DotSettings.user
 
-# JustCode is a .NET coding add-in
-.JustCode
-
 # TeamCity is a build add-in
 _TeamCity*
 
 # DotCover is a Code Coverage Tool
 *.dotCover
 
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
 # NCrunch
 _NCrunch_*
 .*crunch*.local.xml
@@ -138,45 +182,67 @@ publish/
 # Publish Web Output
 *.[Pp]ublish.xml
 *.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings 
+# Note: Comment the next line if you want to checkin your web deploy settings,
 # but database connection strings (with potential passwords) will be unencrypted
 *.pubxml
 *.publishproj
 
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
 # NuGet Packages
 *.nupkg
+# NuGet Symbol Packages
+*.snupkg
 # The packages folder can be ignored because of Package Restore
-**/packages/*
+**/[Pp]ackages/*
 # except build/, which is used as an MSBuild target.
-!**/packages/build/
+!**/[Pp]ackages/build/
 # Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
 
-# Windows Azure Build Output
+# Microsoft Azure Build Output
 csx/
 *.build.csdef
 
-# Windows Store app package directory
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
 AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
 
 # Visual Studio cache files
 # files ending in .cache can be ignored
 *.[Cc]ache
 # but keep track of directories ending in .cache
-!*.[Cc]ache/
+!?*.[Cc]ache/
 
 # Others
 ClientBin/
-[Ss]tyle[Cc]op.*
 ~$*
 *~
 *.dbmdl
 *.dbproj.schemaview
+*.jfm
 *.pfx
 *.publishsettings
-node_modules/
 orleans.codegen.cs
 
+# Including strong name files can present a security risk
+#*.snk
+
 # RIA/Silverlight projects
 Generated_Code/
 
@@ -187,21 +253,32 @@ _UpgradeReport_Files/
 Backup*/
 UpgradeLog*.XML
 UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
 
 # SQL Server files
 *.mdf
 *.ldf
+*.ndf
 
 # Business Intelligence projects
 *.rdl.data
 *.bim.layout
 *.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
 
 # Microsoft Fakes
 FakesAssemblies/
 
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
 # Node.js Tools for Visual Studio
 .ntvs_analysis.dat
+node_modules/
 
 # Visual Studio 6 build log
 *.plg
@@ -209,6 +286,9 @@ FakesAssemblies/
 # Visual Studio 6 workspace options file
 *.opt
 
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
 # Visual Studio LightSwitch build output
 **/*.HTMLClient/GeneratedArtifacts
 **/*.DesktopClient/GeneratedArtifacts
@@ -217,3 +297,62 @@ FakesAssemblies/
 **/*.Server/ModelManifest.xml
 _Pvt_Extensions
 
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# CodeRush personal settings
+.cr/personal
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd

+ 289 - 0
AddressEditForm.Designer.cs

@@ -0,0 +1,289 @@
+namespace WindowsFormsApp4
+{
+    partial class AddressEditForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.txtCity = new System.Windows.Forms.TextBox();
+            this.txtStreet = new System.Windows.Forms.TextBox();
+            this.txtHouse = new System.Windows.Forms.TextBox();
+            this.txtBuilding = new System.Windows.Forms.TextBox();
+            this.txtApartment = new System.Windows.Forms.TextBox();
+            this.cmbAddressType = new System.Windows.Forms.ComboBox();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.lblCity = new System.Windows.Forms.Label();
+            this.lblStreet = new System.Windows.Forms.Label();
+            this.lblHouse = new System.Windows.Forms.Label();
+            this.lblBuilding = new System.Windows.Forms.Label();
+            this.lblApartment = new System.Windows.Forms.Label();
+            this.lblAddressType = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // txtCity
+            // 
+            this.txtCity.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtCity.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtCity.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtCity.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtCity.Location = new System.Drawing.Point(100, 68);
+            this.txtCity.Margin = new System.Windows.Forms.Padding(2);
+            this.txtCity.Name = "txtCity";
+            this.txtCity.Size = new System.Drawing.Size(340, 23);
+            this.txtCity.TabIndex = 2;
+            // 
+            // txtStreet
+            // 
+            this.txtStreet.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtStreet.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtStreet.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtStreet.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtStreet.Location = new System.Drawing.Point(100, 103);
+            this.txtStreet.Margin = new System.Windows.Forms.Padding(2);
+            this.txtStreet.Name = "txtStreet";
+            this.txtStreet.Size = new System.Drawing.Size(340, 23);
+            this.txtStreet.TabIndex = 4;
+            // 
+            // txtHouse
+            // 
+            this.txtHouse.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtHouse.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtHouse.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtHouse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtHouse.Location = new System.Drawing.Point(100, 138);
+            this.txtHouse.Margin = new System.Windows.Forms.Padding(2);
+            this.txtHouse.Name = "txtHouse";
+            this.txtHouse.Size = new System.Drawing.Size(100, 23);
+            this.txtHouse.TabIndex = 6;
+            // 
+            // txtBuilding
+            // 
+            this.txtBuilding.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtBuilding.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtBuilding.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtBuilding.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtBuilding.Location = new System.Drawing.Point(275, 138);
+            this.txtBuilding.Margin = new System.Windows.Forms.Padding(2);
+            this.txtBuilding.Name = "txtBuilding";
+            this.txtBuilding.Size = new System.Drawing.Size(80, 23);
+            this.txtBuilding.TabIndex = 8;
+            // 
+            // txtApartment
+            // 
+            this.txtApartment.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtApartment.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtApartment.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtApartment.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtApartment.Location = new System.Drawing.Point(100, 173);
+            this.txtApartment.Margin = new System.Windows.Forms.Padding(2);
+            this.txtApartment.Name = "txtApartment";
+            this.txtApartment.Size = new System.Drawing.Size(100, 23);
+            this.txtApartment.TabIndex = 10;
+            // 
+            // cmbAddressType
+            // 
+            this.cmbAddressType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.cmbAddressType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbAddressType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cmbAddressType.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.cmbAddressType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.cmbAddressType.Items.AddRange(new object[] {
+            "actual",
+            "delivery"});
+            this.cmbAddressType.Location = new System.Drawing.Point(100, 207);
+            this.cmbAddressType.Margin = new System.Windows.Forms.Padding(2);
+            this.cmbAddressType.Name = "cmbAddressType";
+            this.cmbAddressType.Size = new System.Drawing.Size(150, 24);
+            this.cmbAddressType.TabIndex = 12;
+            // 
+            // btnSave
+            // 
+            this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnSave.FlatAppearance.BorderSize = 0;
+            this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnSave.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnSave.Location = new System.Drawing.Point(90, 260);
+            this.btnSave.Margin = new System.Windows.Forms.Padding(2);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(110, 35);
+            this.btnSave.TabIndex = 13;
+            this.btnSave.Text = "Сохранить";
+            this.btnSave.UseVisualStyleBackColor = false;
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnCancel.FlatAppearance.BorderSize = 0;
+            this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnCancel.Location = new System.Drawing.Point(220, 260);
+            this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(110, 35);
+            this.btnCancel.TabIndex = 14;
+            this.btnCancel.Text = "❌ Отмена";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            // 
+            // lblCity
+            // 
+            this.lblCity.AutoSize = true;
+            this.lblCity.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblCity.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblCity.Location = new System.Drawing.Point(40, 70);
+            this.lblCity.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblCity.Name = "lblCity";
+            this.lblCity.Size = new System.Drawing.Size(52, 17);
+            this.lblCity.TabIndex = 1;
+            this.lblCity.Text = "Город:";
+            // 
+            // lblStreet
+            // 
+            this.lblStreet.AutoSize = true;
+            this.lblStreet.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblStreet.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblStreet.Location = new System.Drawing.Point(40, 105);
+            this.lblStreet.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblStreet.Name = "lblStreet";
+            this.lblStreet.Size = new System.Drawing.Size(53, 17);
+            this.lblStreet.TabIndex = 3;
+            this.lblStreet.Text = "Улица:";
+            // 
+            // lblHouse
+            // 
+            this.lblHouse.AutoSize = true;
+            this.lblHouse.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblHouse.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblHouse.Location = new System.Drawing.Point(40, 140);
+            this.lblHouse.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblHouse.Name = "lblHouse";
+            this.lblHouse.Size = new System.Drawing.Size(40, 17);
+            this.lblHouse.TabIndex = 5;
+            this.lblHouse.Text = "Дом:";
+            // 
+            // lblBuilding
+            // 
+            this.lblBuilding.AutoSize = true;
+            this.lblBuilding.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblBuilding.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblBuilding.Location = new System.Drawing.Point(210, 140);
+            this.lblBuilding.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblBuilding.Name = "lblBuilding";
+            this.lblBuilding.Size = new System.Drawing.Size(59, 17);
+            this.lblBuilding.TabIndex = 7;
+            this.lblBuilding.Text = "Корпус:";
+            // 
+            // lblApartment
+            // 
+            this.lblApartment.AutoSize = true;
+            this.lblApartment.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblApartment.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblApartment.Location = new System.Drawing.Point(30, 175);
+            this.lblApartment.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblApartment.Name = "lblApartment";
+            this.lblApartment.Size = new System.Drawing.Size(75, 17);
+            this.lblApartment.TabIndex = 9;
+            this.lblApartment.Text = "Квартира:";
+            // 
+            // lblAddressType
+            // 
+            this.lblAddressType.AutoSize = true;
+            this.lblAddressType.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblAddressType.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblAddressType.Location = new System.Drawing.Point(40, 210);
+            this.lblAddressType.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblAddressType.Name = "lblAddressType";
+            this.lblAddressType.Size = new System.Drawing.Size(42, 17);
+            this.lblAddressType.TabIndex = 11;
+            this.lblAddressType.Text = "Тип*:";
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(150, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(175, 24);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Редактирование";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(480, 50);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // AddressEditForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(480, 320);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.cmbAddressType);
+            this.Controls.Add(this.lblAddressType);
+            this.Controls.Add(this.txtApartment);
+            this.Controls.Add(this.lblApartment);
+            this.Controls.Add(this.txtBuilding);
+            this.Controls.Add(this.lblBuilding);
+            this.Controls.Add(this.txtHouse);
+            this.Controls.Add(this.lblHouse);
+            this.Controls.Add(this.txtStreet);
+            this.Controls.Add(this.lblStreet);
+            this.Controls.Add(this.txtCity);
+            this.Controls.Add(this.lblCity);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.MaximizeBox = false;
+            this.Name = "AddressEditForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Адрес";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.TextBox txtCity;
+        private System.Windows.Forms.TextBox txtStreet;
+        private System.Windows.Forms.TextBox txtHouse;
+        private System.Windows.Forms.TextBox txtBuilding;
+        private System.Windows.Forms.TextBox txtApartment;
+        private System.Windows.Forms.ComboBox cmbAddressType;
+        private System.Windows.Forms.Button btnSave;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Label lblCity;
+        private System.Windows.Forms.Label lblStreet;
+        private System.Windows.Forms.Label lblHouse;
+        private System.Windows.Forms.Label lblBuilding;
+        private System.Windows.Forms.Label lblApartment;
+        private System.Windows.Forms.Label lblAddressType;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 129 - 0
AddressEditForm.cs

@@ -0,0 +1,129 @@
+using System;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class AddressEditForm : Form
+    {
+        private int? addressId;
+        private bool isEditMode;
+
+        public AddressEditForm()
+        {
+            InitializeComponent();
+            isEditMode = false;
+            lblTitle.Text = "Добавление адреса";
+            AttachEventHandlers();
+        }
+
+        public AddressEditForm(int id, string city, string street, string house, string building, string apartment)
+        {
+            InitializeComponent();
+            isEditMode = true;
+            addressId = id;
+            lblTitle.Text = "Редактирование адреса";
+            txtCity.Text = city;
+            txtStreet.Text = street;
+            txtHouse.Text = house;
+            txtBuilding.Text = building;
+            txtApartment.Text = apartment;
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnSave.Click += BtnSave_Click;
+            btnCancel.Click += BtnCancel_Click;
+        }
+
+        private bool ValidateFields()
+        {
+            if (string.IsNullOrWhiteSpace(txtCity.Text))
+            {
+                MessageBox.Show("Введите город", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtCity.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtStreet.Text))
+            {
+                MessageBox.Show("Введите улицу", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtStreet.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtHouse.Text))
+            {
+                MessageBox.Show("Введите номер дома", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtHouse.Focus();
+                return false;
+            }
+
+            if (cmbAddressType.SelectedItem == null)
+            {
+                MessageBox.Show("Выберите тип адреса", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                cmbAddressType.Focus();
+                return false;
+            }
+
+            return true;
+        }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            if (!ValidateFields())
+                return;
+
+            bool result;
+            if (isEditMode && addressId.HasValue)
+            {
+                result = DatabaseHelper.UpdateAddress(
+                    addressId.Value,
+                    txtCity.Text.Trim(),
+                    txtStreet.Text.Trim(),
+                    txtHouse.Text.Trim(),
+                    txtBuilding.Text.Trim(),
+                    txtApartment.Text.Trim()
+                );
+            }
+            else
+            {
+                int newAddressId = DatabaseHelper.AddAddress(
+                    txtCity.Text.Trim(),
+                    txtStreet.Text.Trim(),
+                    txtHouse.Text.Trim(),
+                    txtBuilding.Text.Trim(),
+                    txtApartment.Text.Trim()
+                );
+                result = newAddressId > 0;
+                if (result && Session.CurrentUser.ClientId.HasValue)
+                {
+                    result = DatabaseHelper.AddClientAddress(
+                        Session.CurrentUser.ClientId.Value,
+                        newAddressId,
+                        cmbAddressType.SelectedItem.ToString(),
+                        10  
+                    );
+                }
+            }
+
+            if (result)
+            {
+                this.DialogResult = DialogResult.OK;
+                this.Close();
+            }
+            else
+            {
+                MessageBox.Show("Ошибка при сохранении", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 120 - 0
AddressEditForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 198 - 0
AddressesForm.Designer.cs

@@ -0,0 +1,198 @@
+namespace WindowsFormsApp4
+{
+    partial class AddressesForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.dgvAddresses = new System.Windows.Forms.DataGridView();
+            this.btnRefresh = new System.Windows.Forms.Button();
+            this.btnAdd = new System.Windows.Forms.Button();
+            this.btnEdit = new System.Windows.Forms.Button();
+            this.btnDelete = new System.Windows.Forms.Button();
+            this.btnSetMain = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAddresses)).BeginInit();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // dgvAddresses
+            // 
+            this.dgvAddresses.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dgvAddresses.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.dgvAddresses.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.dgvAddresses.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvAddresses.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.dgvAddresses.Location = new System.Drawing.Point(12, 60);
+            this.dgvAddresses.Margin = new System.Windows.Forms.Padding(2);
+            this.dgvAddresses.Name = "dgvAddresses";
+            this.dgvAddresses.ReadOnly = true;
+            this.dgvAddresses.RowHeadersVisible = false;
+            this.dgvAddresses.RowTemplate.Height = 28;
+            this.dgvAddresses.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvAddresses.Size = new System.Drawing.Size(676, 310);
+            this.dgvAddresses.TabIndex = 1;
+            // 
+            // btnRefresh
+            // 
+            this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnRefresh.FlatAppearance.BorderSize = 0;
+            this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+            this.btnRefresh.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRefresh.Location = new System.Drawing.Point(12, 385);
+            this.btnRefresh.Margin = new System.Windows.Forms.Padding(2);
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(85, 35);
+            this.btnRefresh.TabIndex = 2;
+            this.btnRefresh.Text = "Обновить";
+            this.btnRefresh.UseVisualStyleBackColor = false;
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnAdd.FlatAppearance.BorderSize = 0;
+            this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAdd.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+            this.btnAdd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnAdd.Location = new System.Drawing.Point(102, 385);
+            this.btnAdd.Margin = new System.Windows.Forms.Padding(2);
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Size = new System.Drawing.Size(85, 35);
+            this.btnAdd.TabIndex = 3;
+            this.btnAdd.Text = "Добавить";
+            this.btnAdd.UseVisualStyleBackColor = false;
+            // 
+            // btnEdit
+            // 
+            this.btnEdit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnEdit.FlatAppearance.BorderSize = 0;
+            this.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnEdit.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+            this.btnEdit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnEdit.Location = new System.Drawing.Point(192, 385);
+            this.btnEdit.Margin = new System.Windows.Forms.Padding(2);
+            this.btnEdit.Name = "btnEdit";
+            this.btnEdit.Size = new System.Drawing.Size(120, 35);
+            this.btnEdit.TabIndex = 4;
+            this.btnEdit.Text = "Редактировать";
+            this.btnEdit.UseVisualStyleBackColor = false;
+            // 
+            // btnDelete
+            // 
+            this.btnDelete.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnDelete.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+            this.btnDelete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnDelete.Location = new System.Drawing.Point(316, 385);
+            this.btnDelete.Margin = new System.Windows.Forms.Padding(2);
+            this.btnDelete.Name = "btnDelete";
+            this.btnDelete.Size = new System.Drawing.Size(85, 35);
+            this.btnDelete.TabIndex = 5;
+            this.btnDelete.Text = "Удалить";
+            this.btnDelete.UseVisualStyleBackColor = false;
+            // 
+            // btnSetMain
+            // 
+            this.btnSetMain.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnSetMain.FlatAppearance.BorderSize = 0;
+            this.btnSetMain.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSetMain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+            this.btnSetMain.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnSetMain.Location = new System.Drawing.Point(405, 385);
+            this.btnSetMain.Margin = new System.Windows.Forms.Padding(2);
+            this.btnSetMain.Name = "btnSetMain";
+            this.btnSetMain.Size = new System.Drawing.Size(120, 35);
+            this.btnSetMain.TabIndex = 6;
+            this.btnSetMain.Text = "⭐ Сделать основным";
+            this.btnSetMain.UseVisualStyleBackColor = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.Location = new System.Drawing.Point(590, 385);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(98, 35);
+            this.btnBack.TabIndex = 7;
+            this.btnBack.Text = "< Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(280, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(127, 24);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Мои адреса";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(700, 50);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // AddressesForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(700, 435);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnSetMain);
+            this.Controls.Add(this.btnDelete);
+            this.Controls.Add(this.btnEdit);
+            this.Controls.Add(this.btnAdd);
+            this.Controls.Add(this.btnRefresh);
+            this.Controls.Add(this.dgvAddresses);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.MaximizeBox = false;
+            this.Name = "AddressesForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Мои адреса - Обработка заявок";
+            ((System.ComponentModel.ISupportInitialize)(this.dgvAddresses)).EndInit();
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        private System.Windows.Forms.DataGridView dgvAddresses;
+        private System.Windows.Forms.Button btnRefresh;
+        private System.Windows.Forms.Button btnAdd;
+        private System.Windows.Forms.Button btnEdit;
+        private System.Windows.Forms.Button btnDelete;
+        private System.Windows.Forms.Button btnSetMain;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 205 - 0
AddressesForm.cs

@@ -0,0 +1,205 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class AddressesForm : Form
+    {
+        private DataTable addressesTable;
+
+        public AddressesForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+            LoadAddresses();
+            ConfigureGrid();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnRefresh.Click += BtnRefresh_Click;
+            btnAdd.Click += BtnAdd_Click;
+            btnEdit.Click += BtnEdit_Click;
+            btnDelete.Click += BtnDelete_Click;
+            btnSetMain.Click += BtnSetMain_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private void LoadAddresses()
+        {
+            try
+            {
+                if (!Session.CurrentUser.ClientId.HasValue)
+                {
+                    MessageBox.Show("Ошибка: не удалось определить ID клиента",
+                        "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    return;
+                }
+
+                addressesTable = DatabaseHelper.GetClientAddressesWithDetails(Session.CurrentUser.ClientId.Value);
+                dgvAddresses.DataSource = addressesTable;
+                ConfigureGrid();
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка загрузки адресов: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void ConfigureGrid()
+        {
+            if (dgvAddresses.Columns.Count == 0) return;
+
+            // Настройка заголовков
+            if (dgvAddresses.Columns.Contains("address_id"))
+                dgvAddresses.Columns["address_id"].HeaderText = "ID";
+
+            if (dgvAddresses.Columns.Contains("city"))
+                dgvAddresses.Columns["city"].HeaderText = "Город";
+
+            if (dgvAddresses.Columns.Contains("street"))
+                dgvAddresses.Columns["street"].HeaderText = "Улица";
+
+            if (dgvAddresses.Columns.Contains("house"))
+                dgvAddresses.Columns["house"].HeaderText = "Дом";
+
+            if (dgvAddresses.Columns.Contains("building"))
+                dgvAddresses.Columns["building"].HeaderText = "Корпус";
+
+            if (dgvAddresses.Columns.Contains("apartment"))
+                dgvAddresses.Columns["apartment"].HeaderText = "Квартира";
+
+            if (dgvAddresses.Columns.Contains("address_type"))
+            {
+                dgvAddresses.Columns["address_type"].HeaderText = "Тип";
+                // Преобразуем значения типов в читаемый вид
+                dgvAddresses.Columns["address_type"].DefaultCellStyle.Format = "";
+            }
+
+            if (dgvAddresses.Columns.Contains("priority"))
+                dgvAddresses.Columns["priority"].HeaderText = "Приоритет";
+
+            // Настройка цвета строк
+            dgvAddresses.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvAddresses.DefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            dgvAddresses.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvAddresses.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvAddresses.ColumnHeadersDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvAddresses.ColumnHeadersDefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvAddresses.EnableHeadersVisualStyles = false;
+
+            dgvAddresses.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
+        }
+
+        private void BtnRefresh_Click(object sender, EventArgs e)
+        {
+            LoadAddresses();
+        }
+
+        private void BtnAdd_Click(object sender, EventArgs e)
+        {
+            AddressEditForm form = new AddressEditForm();
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadAddresses();
+                MessageBox.Show("Адрес успешно добавлен", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnEdit_Click(object sender, EventArgs e)
+        {
+            if (dgvAddresses.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите адрес для редактирования", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int addressId = Convert.ToInt32(dgvAddresses.CurrentRow.Cells["address_id"].Value);
+            string city = dgvAddresses.CurrentRow.Cells["city"].Value.ToString();
+            string street = dgvAddresses.CurrentRow.Cells["street"].Value.ToString();
+            string house = dgvAddresses.CurrentRow.Cells["house"].Value.ToString();
+            string building = dgvAddresses.CurrentRow.Cells["building"].Value?.ToString();
+            string apartment = dgvAddresses.CurrentRow.Cells["apartment"].Value?.ToString();
+
+            AddressEditForm form = new AddressEditForm(addressId, city, street, house, building, apartment);
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadAddresses();
+                MessageBox.Show("Адрес успешно обновлён", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnDelete_Click(object sender, EventArgs e)
+        {
+            if (dgvAddresses.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите адрес для удаления", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int addressId = Convert.ToInt32(dgvAddresses.CurrentRow.Cells["address_id"].Value);
+            string addressText = $"{dgvAddresses.CurrentRow.Cells["city"].Value}, {dgvAddresses.CurrentRow.Cells["street"].Value}, {dgvAddresses.CurrentRow.Cells["house"].Value}";
+
+            DialogResult result = MessageBox.Show($"Удалить адрес: {addressText}?\nВНИМАНИЕ: Удалить можно только адрес, который не используется в заявках!",
+                "Подтверждение удаления", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+
+            if (result == DialogResult.Yes)
+            {
+                if (DatabaseHelper.DeleteClientAddress(Session.CurrentUser.ClientId.Value, addressId))
+                {
+                    LoadAddresses();
+                    MessageBox.Show("Адрес успешно удалён", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при удалении адреса.\nВозможно, адрес используется в заявках.", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+        }
+
+        private void BtnSetMain_Click(object sender, EventArgs e)
+        {
+            if (dgvAddresses.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите адрес", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int addressId = Convert.ToInt32(dgvAddresses.CurrentRow.Cells["address_id"].Value);
+            string addressText = $"{dgvAddresses.CurrentRow.Cells["city"].Value}, {dgvAddresses.CurrentRow.Cells["street"].Value}, {dgvAddresses.CurrentRow.Cells["house"].Value}";
+
+            DialogResult result = MessageBox.Show($"Сделать адрес {addressText} основным?",
+                "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+
+            if (result == DialogResult.Yes)
+            {
+                if (DatabaseHelper.SetMainAddress(Session.CurrentUser.ClientId.Value, addressId))
+                {
+                    LoadAddresses();
+                    MessageBox.Show("Основной адрес обновлён", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при установке основного адреса", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 120 - 0
AddressesForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 33 - 0
App.config

@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
+    </startup>
+	<connectionStrings>
+		<add name="PostgreSQL" providerName="Npgsql" connectionString="host = 80.250.189.52;Port=5432;Database=dbcourse;Username=zimogorov_aa;Password=2485$$z1bf7;" />
+	</connectionStrings>
+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-1.0.115.5" newVersion="1.0.115.5" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
+      </dependentAssembly>
+      <dependentAssembly>
+        <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
+        <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>
+</configuration>

+ 136 - 0
AssignManagerForm.Designer.cs

@@ -0,0 +1,136 @@
+namespace WindowsFormsApp4
+{
+    partial class AssignManagerForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.cmbManager = new System.Windows.Forms.ComboBox();
+            this.btnAssign = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.lblSelectManager = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // cmbManager
+            // 
+            this.cmbManager.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.cmbManager.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbManager.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cmbManager.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.cmbManager.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.cmbManager.Location = new System.Drawing.Point(26, 98);
+            this.cmbManager.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.cmbManager.Name = "cmbManager";
+            this.cmbManager.Size = new System.Drawing.Size(248, 28);
+            this.cmbManager.TabIndex = 2;
+            // 
+            // btnAssign
+            // 
+            this.btnAssign.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnAssign.FlatAppearance.BorderSize = 0;
+            this.btnAssign.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAssign.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnAssign.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnAssign.Location = new System.Drawing.Point(42, 146);
+            this.btnAssign.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnAssign.Name = "btnAssign";
+            this.btnAssign.Size = new System.Drawing.Size(112, 32);
+            this.btnAssign.TabIndex = 3;
+            this.btnAssign.Text = "Назначить";
+            this.btnAssign.UseVisualStyleBackColor = false;
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnCancel.FlatAppearance.BorderSize = 0;
+            this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnCancel.Location = new System.Drawing.Point(158, 146);
+            this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(82, 32);
+            this.btnCancel.TabIndex = 4;
+            this.btnCancel.Text = "Отмена";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(75, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(145, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Назначение";
+            // 
+            // lblSelectManager
+            // 
+            this.lblSelectManager.AutoSize = true;
+            this.lblSelectManager.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.lblSelectManager.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblSelectManager.Location = new System.Drawing.Point(22, 73);
+            this.lblSelectManager.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblSelectManager.Name = "lblSelectManager";
+            this.lblSelectManager.Size = new System.Drawing.Size(180, 20);
+            this.lblSelectManager.TabIndex = 1;
+            this.lblSelectManager.Text = "Выберите менеджера:";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(300, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // AssignManagerForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(300, 211);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnAssign);
+            this.Controls.Add(this.cmbManager);
+            this.Controls.Add(this.lblSelectManager);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "AssignManagerForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Назначение менеджера";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.ComboBox cmbManager;
+        private System.Windows.Forms.Button btnAssign;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Label lblSelectManager;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 108 - 0
AssignManagerForm.cs

@@ -0,0 +1,108 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class AssignManagerForm : Form
+    {
+        private int requestId;
+
+        public AssignManagerForm(int requestId)
+        {
+            InitializeComponent();
+            this.requestId = requestId;
+            LoadManagers();
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnAssign.Click += BtnAssign_Click;
+            btnCancel.Click += BtnCancel_Click;
+        }
+
+        private void LoadManagers()
+        {
+            try
+            {
+                DataTable managers = DatabaseHelper.GetManagers();
+
+                // Очищаем ComboBox
+                cmbManager.Items.Clear();
+
+                // Заполняем вручную
+                foreach (DataRow row in managers.Rows)
+                {
+                    string name = row["last_name"].ToString() + " " + row["first_name"].ToString();
+                    int id = Convert.ToInt32(row["id"]);
+
+                    // Создаем объект для хранения
+                    var item = new ManagerItem { Id = id, Name = name };
+                    cmbManager.Items.Add(item);
+                }
+
+                cmbManager.DisplayMember = "Name";
+                cmbManager.ValueMember = "Id";
+
+                if (cmbManager.Items.Count == 0)
+                {
+                    MessageBox.Show("Нет доступных менеджеров", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    btnAssign.Enabled = false;
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка загрузки менеджеров: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnAssign_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (cmbManager.SelectedItem == null)
+                {
+                    MessageBox.Show("Выберите менеджера", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                // Получаем ID из выбранного объекта
+                var selected = (ManagerItem)cmbManager.SelectedItem;
+                int managerId = selected.Id;
+
+                // Назначение менеджера
+                DatabaseHelper.AssignManagerToRequest(requestId, managerId);
+                DatabaseHelper.UpdateRequestStatus(requestId, "in_progress");
+
+                MessageBox.Show("Менеджер успешно назначен на заявку", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+
+                this.DialogResult = DialogResult.OK;
+                this.Close();
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка при назначении: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+
+        // Вспомогательный класс
+        public class ManagerItem
+        {
+            public int Id { get; set; }
+            public string Name { get; set; }
+        }
+    }
+}

+ 120 - 0
AssignManagerForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 233 - 0
Bd.Designer.cs

@@ -0,0 +1,233 @@
+namespace WindowsFormsApp4
+{
+    partial class Form1
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend3 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            this.dataGridView1 = new System.Windows.Forms.DataGridView();
+            this.label1 = new System.Windows.Forms.Label();
+            this.button1 = new System.Windows.Forms.Button();
+            this.label2 = new System.Windows.Forms.Label();
+            this.button4 = new System.Windows.Forms.Button();
+            this.button5 = new System.Windows.Forms.Button();
+            this.chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart();
+            this.button2 = new System.Windows.Forms.Button();
+            this.button3 = new System.Windows.Forms.Button();
+            this.button6 = new System.Windows.Forms.Button();
+            this.button8 = new System.Windows.Forms.Button();
+            this.button7 = new System.Windows.Forms.Button();
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.chart1)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // dataGridView1
+            // 
+            this.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
+            this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
+            this.dataGridView1.Location = new System.Drawing.Point(348, 85);
+            this.dataGridView1.Name = "dataGridView1";
+            this.dataGridView1.Size = new System.Drawing.Size(646, 296);
+            this.dataGridView1.TabIndex = 0;
+            this.dataGridView1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.BackColor = System.Drawing.Color.MistyRose;
+            this.label1.Font = new System.Drawing.Font("Verdana", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.label1.Location = new System.Drawing.Point(12, 9);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(264, 32);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "Главная страница";
+            // 
+            // button1
+            // 
+            this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button1.Location = new System.Drawing.Point(92, 85);
+            this.button1.Name = "button1";
+            this.button1.Size = new System.Drawing.Size(188, 52);
+            this.button1.TabIndex = 2;
+            this.button1.Text = "Авто";
+            this.button1.UseVisualStyleBackColor = true;
+            this.button1.Click += new System.EventHandler(this.button1_Click);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.BackColor = System.Drawing.Color.MistyRose;
+            this.label2.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.label2.Location = new System.Drawing.Point(12, 47);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(346, 25);
+            this.label2.TabIndex = 6;
+            this.label2.Text = "Выберите таблицу для вывода";
+            // 
+            // button4
+            // 
+            this.button4.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button4.Location = new System.Drawing.Point(92, 201);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(188, 52);
+            this.button4.TabIndex = 9;
+            this.button4.Text = "Пользователи";
+            this.button4.UseVisualStyleBackColor = true;
+            this.button4.Click += new System.EventHandler(this.button4_Click);
+            // 
+            // button5
+            // 
+            this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button5.Location = new System.Drawing.Point(92, 143);
+            this.button5.Name = "button5";
+            this.button5.Size = new System.Drawing.Size(188, 52);
+            this.button5.TabIndex = 10;
+            this.button5.Text = "Продажи";
+            this.button5.UseVisualStyleBackColor = true;
+            this.button5.Click += new System.EventHandler(this.button5_Click);
+            // 
+            // chart1
+            // 
+            chartArea3.Name = "ChartArea1";
+            this.chart1.ChartAreas.Add(chartArea3);
+            legend3.Name = "Legend1";
+            this.chart1.Legends.Add(legend3);
+            this.chart1.Location = new System.Drawing.Point(348, 409);
+            this.chart1.Name = "chart1";
+            series3.ChartArea = "ChartArea1";
+            series3.Legend = "Legend1";
+            series3.Name = "Series1";
+            this.chart1.Series.Add(series3);
+            this.chart1.Size = new System.Drawing.Size(646, 278);
+            this.chart1.TabIndex = 11;
+            this.chart1.Text = "chart1";
+            this.chart1.Click += new System.EventHandler(this.chart1_Click);
+            // 
+            // button2
+            // 
+            this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button2.Location = new System.Drawing.Point(104, 505);
+            this.button2.Name = "button2";
+            this.button2.Size = new System.Drawing.Size(188, 60);
+            this.button2.TabIndex = 12;
+            this.button2.Text = "Кол-во автомобилей";
+            this.button2.UseVisualStyleBackColor = true;
+            this.button2.Click += new System.EventHandler(this.button2_Click);
+            // 
+            // button3
+            // 
+            this.button3.BackColor = System.Drawing.Color.Red;
+            this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button3.Location = new System.Drawing.Point(1000, 228);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(136, 64);
+            this.button3.TabIndex = 13;
+            this.button3.Text = "Удалить Авто";
+            this.button3.UseVisualStyleBackColor = false;
+            this.button3.Click += new System.EventHandler(this.button3_Click);
+            // 
+            // button6
+            // 
+            this.button6.BackColor = System.Drawing.Color.Lime;
+            this.button6.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button6.Location = new System.Drawing.Point(1000, 85);
+            this.button6.Name = "button6";
+            this.button6.Size = new System.Drawing.Size(136, 70);
+            this.button6.TabIndex = 14;
+            this.button6.Text = "Добавить новое авто";
+            this.button6.UseVisualStyleBackColor = false;
+            this.button6.Click += new System.EventHandler(this.button6_Click);
+            // 
+            // button8
+            // 
+            this.button8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(255)))));
+            this.button8.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button8.Location = new System.Drawing.Point(1000, 298);
+            this.button8.Name = "button8";
+            this.button8.Size = new System.Drawing.Size(136, 83);
+            this.button8.TabIndex = 16;
+            this.button8.Text = "Добавить продажу";
+            this.button8.UseVisualStyleBackColor = false;
+            // 
+            // button7
+            // 
+            this.button7.BackColor = System.Drawing.Color.Yellow;
+            this.button7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.button7.Location = new System.Drawing.Point(1000, 161);
+            this.button7.Name = "button7";
+            this.button7.Size = new System.Drawing.Size(136, 61);
+            this.button7.TabIndex = 17;
+            this.button7.Text = "Изменить Авто";
+            this.button7.UseVisualStyleBackColor = false;
+            this.button7.Click += new System.EventHandler(this.button7_Click_2);
+            // 
+            // Form1
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.MistyRose;
+            this.ClientSize = new System.Drawing.Size(1171, 714);
+            this.Controls.Add(this.button7);
+            this.Controls.Add(this.button8);
+            this.Controls.Add(this.button6);
+            this.Controls.Add(this.button3);
+            this.Controls.Add(this.button2);
+            this.Controls.Add(this.chart1);
+            this.Controls.Add(this.button5);
+            this.Controls.Add(this.button4);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.button1);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.dataGridView1);
+            this.Name = "Form1";
+            this.Text = "Bd";
+            this.Load += new System.EventHandler(this.Form1_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.chart1)).EndInit();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.DataGridView dataGridView1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button button5;
+        private System.Windows.Forms.DataVisualization.Charting.Chart chart1;
+        private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.Button button6;
+        private System.Windows.Forms.Button button8;
+        private System.Windows.Forms.Button button7;
+    }
+}

+ 291 - 0
Bd.cs

@@ -0,0 +1,291 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+using Npgsql;
+using System.Windows.Forms.DataVisualization.Charting;
+
+namespace WindowsFormsApp4
+{
+    public partial class Form1 : Form
+    {
+        
+
+        private string connectionString = "Host=80.250.189.52;Port=5432;Database=dbcourse;Username=druzhinin_ia;Password=q$J37q6#6f%";
+        public Form1()
+        {
+            InitializeComponent();
+        }
+
+        private void Form1_Load(object sender, EventArgs e)
+        {
+
+        }
+
+        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
+        {
+
+        }
+
+        private void button1_Click(object sender, EventArgs e)
+        {
+            NpgsqlConnection connection = null;
+            connection = new NpgsqlConnection(connectionString);
+
+            connection.Open();
+
+            string query = "SELECT * FROM \"auto\"";
+
+            NpgsqlDataAdapter adapter = new NpgsqlDataAdapter(query, connection);
+            DataTable dataTable = new DataTable();
+
+            adapter.Fill(dataTable);
+
+            dataGridView1.DataSource = dataTable;
+
+        }
+
+        private void button5_Click(object sender, EventArgs e)
+        {
+            NpgsqlConnection connection = null;
+            connection = new NpgsqlConnection(connectionString);
+
+            connection.Open();
+
+            string query = "SELECT * FROM \"sell_auto\"";
+
+            NpgsqlDataAdapter adapter = new NpgsqlDataAdapter(query, connection);
+            DataTable dataTable = new DataTable();
+
+            adapter.Fill(dataTable);
+
+            dataGridView1.DataSource = dataTable;
+        }
+
+        private void button4_Click(object sender, EventArgs e)
+        {
+            NpgsqlConnection connection = null;
+            connection = new NpgsqlConnection(connectionString);
+
+            connection.Open();
+
+            string query = "SELECT * FROM \"users\"";
+
+            NpgsqlDataAdapter adapter = new NpgsqlDataAdapter(query, connection);
+            DataTable dataTable = new DataTable();
+
+            adapter.Fill(dataTable);
+
+            dataGridView1.DataSource = dataTable;
+        }
+
+        private void chart1_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void button2_Click(object sender, EventArgs e)
+        {
+            Series series = new Series("Автомобили по брендам");
+            series.ChartType = SeriesChartType.Column;
+            series.Color = Color.DodgerBlue;
+            series.BorderColor = Color.DarkBlue;
+            series.BorderWidth = 2;
+            series.IsValueShownAsLabel = true;
+            series.LabelForeColor = Color.White;
+            series.Font = new Font("Arial", 9, FontStyle.Bold);
+
+            using (NpgsqlConnection connection = new NpgsqlConnection(connectionString))
+            {
+                connection.Open();
+
+                string query = @"
+                        SELECT 
+                            b.name as brand_name, 
+                            COUNT(*) as car_count
+                        FROM auto a
+                        JOIN brand b ON a.brand_id = b.id
+                        GROUP BY b.id, b.name
+                        ORDER BY car_count DESC";
+
+                using (NpgsqlCommand cmd = new NpgsqlCommand(query, connection))
+                using (NpgsqlDataReader reader = cmd.ExecuteReader())
+                {
+                    while (reader.Read())
+                    {
+                        string brandName = reader.GetString(0);
+                        int carCount = reader.GetInt32(1);
+
+                        DataPoint point = new DataPoint();
+                        point.SetValueXY(brandName, carCount);
+                        point.Label = carCount.ToString();
+
+                        series.Points.Add(point);
+                    }
+                }
+            }
+
+            chart1.Series.Add(series);
+
+            chart1.Titles.Add("Распределение автомобилей по брендам");
+            chart1.Titles[0].Font = new Font("Arial", 14, FontStyle.Bold);
+            chart1.Titles[0].ForeColor = Color.DarkBlue;
+
+            chart1.Update();
+        }
+
+        private void button6_Click(object sender, EventArgs e)
+        {
+            var row = dataGridView1.Rows[dataGridView1.Rows.Count - 2];
+
+            string sql = $@"
+        INSERT INTO auto 
+        (
+            ID, model_id, year_release, VIN_num, color, 
+            retail_price, purchase_price, provider_id
+        ) 
+        VALUES 
+        (
+            {row.Cells["brand_id"].Value ?? 1},
+            {row.Cells["model_id"].Value ?? 1},
+            '{(row.Cells["year_release"].Value ?? DateTime.Today):yyyy-MM-dd}',
+            '{row.Cells["VIN_num"].Value ?? "NEWVIN"}',
+            '{row.Cells["color"].Value ?? "Черный"}',
+            {row.Cells["retail_price"].Value ?? 1000000},
+            {row.Cells["purchase_price"].Value ?? 800000},
+            {row.Cells["provider_id"].Value ?? 1}
+        )";
+
+            using (var conn = new NpgsqlConnection(connectionString))
+            {
+                conn.Open();
+                new NpgsqlCommand(sql, conn).ExecuteNonQuery();
+            }
+
+            MessageBox.Show("Добавлено!");
+            button1_Click(sender, e);
+
+        }
+
+        private void button3_Click(object sender, EventArgs e)
+        {
+            if (dataGridView1.CurrentRow == null || dataGridView1.CurrentRow.IsNewRow)
+            {
+                MessageBox.Show("Выберите автомобиль для удаления!");
+                return;
+            }
+
+            int autoId = Convert.ToInt32(dataGridView1.CurrentRow.Cells["num_auto"].Value);
+
+            DialogResult result = MessageBox.Show(
+                $"Вы действительно хотите удалить автомобиль с ID {autoId}?",
+                "Подтверждение удаления",
+                MessageBoxButtons.YesNo,
+                MessageBoxIcon.Question);
+
+            if (result == DialogResult.Yes)
+            {
+                string sql = $"DELETE FROM auto WHERE num_auto = {autoId}";
+
+                using (NpgsqlConnection conn = new NpgsqlConnection(connectionString))
+                {
+                    conn.Open();
+                    int rowsAffected = new NpgsqlCommand(sql, conn).ExecuteNonQuery();
+
+                    if (rowsAffected > 0)
+                    {
+                        MessageBox.Show($"Автомобиль с ID {autoId} успешно удален!");
+
+                        button1_Click(sender, e);
+                    }
+                    else
+                    {
+                        MessageBox.Show("Автомобиль не найден!");
+                    }
+                }
+            }
+        }
+
+        private void button7_Click(object sender, EventArgs e)
+        {
+
+        }
+
+        private void button7_Click_1(object sender, EventArgs e)
+        {
+            var row = dataGridView1.Rows[dataGridView1.Rows.Count - 2];
+
+            string sql = $@"
+            INSERT INTO sell_auto 
+            (
+                staff_id, client_id, date_sell, num_auto, type_pay
+            ) 
+            VALUES 
+            (
+                {row.Cells["staff_id"].Value ?? 1},
+                {row.Cells["client_id"].Value ?? 1},
+                '{(row.Cells["date_sell"].Value ?? DateTime.Today):yyyy-MM-dd}',
+                {row.Cells["num_auto"].Value ?? 1},
+                '{row.Cells["type_pay"].Value ?? "Наличные"}'
+            )";
+
+            using (var conn = new NpgsqlConnection(connectionString))
+            {
+                conn.Open();
+                new NpgsqlCommand(sql, conn).ExecuteNonQuery();
+            }
+
+            MessageBox.Show("Продажа добавлена в таблицу sell_auto!");
+
+            button5_Click(sender, e);
+        }
+
+        private void button7_Click_2(object sender, EventArgs e)
+        {
+            if (dataGridView1.CurrentRow == null || dataGridView1.CurrentRow.IsNewRow)
+            {
+                MessageBox.Show("Выберите автомобиль для изменения!");
+                return;
+            }
+
+            int autoId = Convert.ToInt32(dataGridView1.CurrentRow.Cells["num_auto"].Value);
+
+            DataGridViewRow row = dataGridView1.CurrentRow;
+
+            string sql = $@"
+            UPDATE auto 
+            SET 
+                brand_id = {row.Cells["brand_id"].Value ?? 1},
+                model_id = {row.Cells["model_id"].Value ?? 1},
+                year_release = '{(row.Cells["year_release"].Value ?? DateTime.Today):yyyy-MM-dd}',
+                VIN_num = '{row.Cells["VIN_num"].Value ?? ""}',
+                color = '{row.Cells["color"].Value ?? ""}',
+                retail_price = {row.Cells["retail_price"].Value ?? 0},
+                purchase_price = {row.Cells["purchase_price"].Value ?? 0},
+                provider_id = {row.Cells["provider_id"].Value ?? 1},
+                WHERE num_auto = {autoId}";
+
+            using (NpgsqlConnection conn = new NpgsqlConnection(connectionString))
+            {
+                conn.Open();
+                int rowsAffected = new NpgsqlCommand(sql, conn).ExecuteNonQuery();
+
+                if (rowsAffected > 0)
+                {
+                    MessageBox.Show($"Данные автомобиля с ID {autoId} обновлены!");
+
+                    button1_Click(sender, e);
+                }
+                else
+                {
+                    MessageBox.Show("Автомобиль не найден!");
+                }
+            }
+        }
+    }
+}

+ 120 - 0
Bd.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 129 - 0
ChangeStatusForm.Designer.cs

@@ -0,0 +1,129 @@
+namespace WindowsFormsApp4
+{
+    partial class ChangeStatusForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.lblCurrentStatus = new System.Windows.Forms.Label();
+            this.cmbNewStatus = new System.Windows.Forms.ComboBox();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.label1 = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(400, 60);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.lblTitle.Location = new System.Drawing.Point(100, 15);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(200, 31);
+            this.lblTitle.Text = "Изменение статуса";
+            // 
+            // lblCurrentStatus
+            // 
+            this.lblCurrentStatus.AutoSize = true;
+            this.lblCurrentStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.lblCurrentStatus.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.lblCurrentStatus.Location = new System.Drawing.Point(30, 80);
+            this.lblCurrentStatus.Name = "lblCurrentStatus";
+            this.lblCurrentStatus.Size = new System.Drawing.Size(150, 25);
+            this.lblCurrentStatus.Text = "Текущий статус:";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.label1.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.label1.Location = new System.Drawing.Point(30, 130);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(130, 25);
+            this.label1.Text = "Новый статус:";
+            // 
+            // cmbNewStatus
+            // 
+            this.cmbNewStatus.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbNewStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F);
+            this.cmbNewStatus.Location = new System.Drawing.Point(170, 127);
+            this.cmbNewStatus.Name = "cmbNewStatus";
+            this.cmbNewStatus.Size = new System.Drawing.Size(180, 33);
+            this.cmbNewStatus.TabIndex = 3;
+            // 
+            // btnSave
+            // 
+            this.btnSave.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnSave.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.btnSave.Location = new System.Drawing.Point(60, 190);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(120, 40);
+            this.btnSave.Text = "✅ Сохранить";
+            this.btnSave.UseVisualStyleBackColor = false;
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.BackColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnCancel.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.btnCancel.Location = new System.Drawing.Point(200, 190);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(120, 40);
+            this.btnCancel.Text = "❌ Отмена";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            // 
+            // ChangeStatusForm
+            // 
+            this.ClientSize = new System.Drawing.Size(400, 260);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.cmbNewStatus);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.lblCurrentStatus);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.MaximizeBox = false;
+            this.Name = "ChangeStatusForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Изменение статуса";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+        }
+
+        private System.Windows.Forms.Label lblCurrentStatus;
+        private System.Windows.Forms.ComboBox cmbNewStatus;
+        private System.Windows.Forms.Button btnSave;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 136 - 0
ChangeStatusForm.cs

@@ -0,0 +1,136 @@
+using System;
+using System.Windows.Forms;
+
+namespace WindowsFormsApp4
+{
+    public partial class ChangeStatusForm : Form
+    {
+        private int requestId;
+        private string currentStatus;
+
+        public ChangeStatusForm(int requestId, string currentStatus)
+        {
+            InitializeComponent();
+            this.requestId = requestId;
+            this.currentStatus = currentStatus;
+
+            AttachEventHandlers();
+            LoadAvailableStatuses();
+            DisplayCurrentStatus();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnSave.Click += BtnSave_Click;
+            btnCancel.Click += BtnCancel_Click;
+        }
+
+        private void LoadAvailableStatuses()
+        {
+            // Доступные статусы
+            cmbNewStatus.Items.Clear();
+
+            if (currentStatus != "new")
+                cmbNewStatus.Items.Add("Новая");
+            if (currentStatus != "in_progress")
+                cmbNewStatus.Items.Add("В работе");
+            if (currentStatus != "completed")
+                cmbNewStatus.Items.Add("Выполнена");
+            if (currentStatus != "cancelled")
+                cmbNewStatus.Items.Add("Отменена");
+            if (currentStatus != "overdue")
+                cmbNewStatus.Items.Add("Просрочена");
+
+            if (cmbNewStatus.Items.Count > 0)
+                cmbNewStatus.SelectedIndex = 0;
+        }
+
+        private void DisplayCurrentStatus()
+        {
+            string displayStatus = "";
+
+            switch (currentStatus)
+            {
+                case "new":
+                    displayStatus = "Новая";
+                    break;
+                case "in_progress":
+                    displayStatus = "В работе";
+                    break;
+                case "completed":
+                    displayStatus = "Выполнена";
+                    break;
+                case "cancelled":
+                    displayStatus = "Отменена";
+                    break;
+                case "overdue":
+                    displayStatus = "Просрочена";
+                    break;
+                default:
+                    displayStatus = currentStatus;
+                    break;
+            }
+
+            lblCurrentStatus.Text = $"Текущий статус: {displayStatus}";
+        }
+
+        private string GetStatusValue(string displayStatus)
+        {
+            switch (displayStatus)
+            {
+                case "Новая":
+                    return "new";
+                case "В работе":
+                    return "in_progress";
+                case "Выполнена":
+                    return "completed";
+                case "Отменена":
+                    return "cancelled";
+                case "Просрочена":
+                    return "overdue";
+                default:
+                    return "";
+            }
+        }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                if (cmbNewStatus.SelectedItem == null)
+                {
+                    MessageBox.Show("Выберите новый статус", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                string selectedStatus = cmbNewStatus.SelectedItem.ToString();
+                string newStatus = GetStatusValue(selectedStatus);
+
+                if (DatabaseHelper.UpdateRequestStatus(requestId, newStatus))
+                {
+                    MessageBox.Show("Статус успешно изменён", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                    this.DialogResult = DialogResult.OK;
+                    this.Close();
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при изменении статуса", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 120 - 0
ChangeStatusForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 227 - 0
ClientEditForm.Designer.cs

@@ -0,0 +1,227 @@
+namespace WindowsFormsApp4
+{
+    partial class ClientEditForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.txtLastName = new System.Windows.Forms.TextBox();
+            this.txtFirstName = new System.Windows.Forms.TextBox();
+            this.txtMiddleName = new System.Windows.Forms.TextBox();
+            this.txtPhone = new System.Windows.Forms.TextBox();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.lblLastName = new System.Windows.Forms.Label();
+            this.lblFirstName = new System.Windows.Forms.Label();
+            this.lblMiddleName = new System.Windows.Forms.Label();
+            this.lblPhone = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // txtLastName
+            // 
+            this.txtLastName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtLastName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtLastName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtLastName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtLastName.Location = new System.Drawing.Point(98, 63);
+            this.txtLastName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtLastName.Name = "txtLastName";
+            this.txtLastName.Size = new System.Drawing.Size(188, 23);
+            this.txtLastName.TabIndex = 2;
+            // 
+            // txtFirstName
+            // 
+            this.txtFirstName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtFirstName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtFirstName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtFirstName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtFirstName.Location = new System.Drawing.Point(98, 91);
+            this.txtFirstName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtFirstName.Name = "txtFirstName";
+            this.txtFirstName.Size = new System.Drawing.Size(188, 23);
+            this.txtFirstName.TabIndex = 4;
+            // 
+            // txtMiddleName
+            // 
+            this.txtMiddleName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtMiddleName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtMiddleName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtMiddleName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtMiddleName.Location = new System.Drawing.Point(98, 119);
+            this.txtMiddleName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtMiddleName.Name = "txtMiddleName";
+            this.txtMiddleName.Size = new System.Drawing.Size(188, 23);
+            this.txtMiddleName.TabIndex = 6;
+            // 
+            // txtPhone
+            // 
+            this.txtPhone.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtPhone.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtPhone.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtPhone.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtPhone.Location = new System.Drawing.Point(98, 148);
+            this.txtPhone.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtPhone.Name = "txtPhone";
+            this.txtPhone.Size = new System.Drawing.Size(188, 23);
+            this.txtPhone.TabIndex = 8;
+            // 
+            // btnSave
+            // 
+            this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnSave.FlatAppearance.BorderSize = 0;
+            this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnSave.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnSave.Location = new System.Drawing.Point(75, 195);
+            this.btnSave.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(104, 32);
+            this.btnSave.TabIndex = 9;
+            this.btnSave.Text = "Сохранить";
+            this.btnSave.UseVisualStyleBackColor = false;
+            this.btnSave.Click += new System.EventHandler(this.BtnSave_Click);
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnCancel.FlatAppearance.BorderSize = 0;
+            this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnCancel.Location = new System.Drawing.Point(183, 195);
+            this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(102, 32);
+            this.btnCancel.TabIndex = 10;
+            this.btnCancel.Text = "Отмена";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
+            // 
+            // lblLastName
+            // 
+            this.lblLastName.AutoSize = true;
+            this.lblLastName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblLastName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblLastName.Location = new System.Drawing.Point(28, 65);
+            this.lblLastName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblLastName.Name = "lblLastName";
+            this.lblLastName.Size = new System.Drawing.Size(74, 17);
+            this.lblLastName.TabIndex = 1;
+            this.lblLastName.Text = "Фамилия:";
+            // 
+            // lblFirstName
+            // 
+            this.lblFirstName.AutoSize = true;
+            this.lblFirstName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblFirstName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblFirstName.Location = new System.Drawing.Point(52, 93);
+            this.lblFirstName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblFirstName.Name = "lblFirstName";
+            this.lblFirstName.Size = new System.Drawing.Size(39, 17);
+            this.lblFirstName.TabIndex = 3;
+            this.lblFirstName.Text = "Имя:";
+            // 
+            // lblMiddleName
+            // 
+            this.lblMiddleName.AutoSize = true;
+            this.lblMiddleName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblMiddleName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblMiddleName.Location = new System.Drawing.Point(29, 125);
+            this.lblMiddleName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblMiddleName.Name = "lblMiddleName";
+            this.lblMiddleName.Size = new System.Drawing.Size(75, 17);
+            this.lblMiddleName.TabIndex = 5;
+            this.lblMiddleName.Text = "Отчество:";
+            // 
+            // lblPhone
+            // 
+            this.lblPhone.AutoSize = true;
+            this.lblPhone.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblPhone.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblPhone.Location = new System.Drawing.Point(30, 150);
+            this.lblPhone.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblPhone.Name = "lblPhone";
+            this.lblPhone.Size = new System.Drawing.Size(72, 17);
+            this.lblPhone.TabIndex = 7;
+            this.lblPhone.Text = "Телефон:";
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(90, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(195, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Редактирование";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(338, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // ClientEditForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(338, 260);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.txtPhone);
+            this.Controls.Add(this.lblPhone);
+            this.Controls.Add(this.txtMiddleName);
+            this.Controls.Add(this.lblMiddleName);
+            this.Controls.Add(this.txtFirstName);
+            this.Controls.Add(this.lblFirstName);
+            this.Controls.Add(this.txtLastName);
+            this.Controls.Add(this.lblLastName);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "ClientEditForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Клиент";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.TextBox txtLastName;
+        private System.Windows.Forms.TextBox txtFirstName;
+        private System.Windows.Forms.TextBox txtMiddleName;
+        private System.Windows.Forms.TextBox txtPhone;
+        private System.Windows.Forms.Button btnSave;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Label lblLastName;
+        private System.Windows.Forms.Label lblFirstName;
+        private System.Windows.Forms.Label lblMiddleName;
+        private System.Windows.Forms.Label lblPhone;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 121 - 0
ClientEditForm.cs

@@ -0,0 +1,121 @@
+using System;
+using System.Text.RegularExpressions;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class ClientEditForm : Form
+    {
+        private int? clientId;
+        private bool isEditMode;
+
+        public ClientEditForm()
+        {
+            InitializeComponent();
+            isEditMode = false;
+            lblTitle.Text = "Добавление клиента";
+            AttachEventHandlers();
+        }
+
+        public ClientEditForm(int id, string lastName, string firstName, string middleName, string phone)
+        {
+            InitializeComponent();
+            isEditMode = true;
+            clientId = id;
+            lblTitle.Text = "Редактирование клиента";
+            txtLastName.Text = lastName;
+            txtFirstName.Text = firstName;
+            txtMiddleName.Text = middleName;
+            txtPhone.Text = phone;
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnSave.Click += BtnSave_Click;
+            btnCancel.Click += BtnCancel_Click;
+        }
+
+        private bool ValidateFields()
+        {
+            if (string.IsNullOrWhiteSpace(txtLastName.Text))
+            {
+                MessageBox.Show("Введите фамилию", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtLastName.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtFirstName.Text))
+            {
+                MessageBox.Show("Введите имя", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtFirstName.Focus();
+                return false;
+            }
+
+            string phone = txtPhone.Text.Trim();
+            if (string.IsNullOrWhiteSpace(phone))
+            {
+                MessageBox.Show("Введите номер телефона", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return false;
+            }
+
+            Regex phoneRegex = new Regex(@"^(\+7|8)[0-9]{10}$");
+            if (!phoneRegex.IsMatch(phone))
+            {
+                MessageBox.Show("Некорректный номер телефона. Формат: +7XXXXXXXXXX или 8XXXXXXXXXX",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return false;
+            }
+
+            return true;
+        }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            if (!ValidateFields())
+                return;
+
+            bool result;
+            if (isEditMode && clientId.HasValue)
+            {
+                result = DatabaseHelper.UpdateClient(
+                    clientId.Value,
+                    txtLastName.Text.Trim(),
+                    txtFirstName.Text.Trim(),
+                    txtMiddleName.Text.Trim(),
+                    txtPhone.Text.Trim()
+                );
+            }
+            else
+            {
+                int newId = DatabaseHelper.AddClient(
+                    txtLastName.Text.Trim(),
+                    txtFirstName.Text.Trim(),
+                    txtMiddleName.Text.Trim(),
+                    txtPhone.Text.Trim()
+                );
+                result = newId > 0;
+            }
+
+            if (result)
+            {
+                this.DialogResult = DialogResult.OK;
+                this.Close();
+            }
+            else
+            {
+                MessageBox.Show("Ошибка при сохранении", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 120 - 0
ClientEditForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 180 - 0
ClientsForm.Designer.cs

@@ -0,0 +1,180 @@
+namespace WindowsFormsApp4
+{
+    partial class ClientsForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.dgvClients = new System.Windows.Forms.DataGridView();
+            this.btnRefresh = new System.Windows.Forms.Button();
+            this.btnAdd = new System.Windows.Forms.Button();
+            this.btnEdit = new System.Windows.Forms.Button();
+            this.btnDelete = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvClients)).BeginInit();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // dgvClients
+            // 
+            this.dgvClients.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dgvClients.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.dgvClients.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.dgvClients.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvClients.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.dgvClients.Location = new System.Drawing.Point(15, 65);
+            this.dgvClients.Margin = new System.Windows.Forms.Padding(2);
+            this.dgvClients.Name = "dgvClients";
+            this.dgvClients.ReadOnly = true;
+            this.dgvClients.RowHeadersVisible = false;
+            this.dgvClients.RowTemplate.Height = 30;
+            this.dgvClients.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvClients.Size = new System.Drawing.Size(645, 325);
+            this.dgvClients.TabIndex = 1;
+            // 
+            // btnRefresh
+            // 
+            this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnRefresh.FlatAppearance.BorderSize = 0;
+            this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnRefresh.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRefresh.Location = new System.Drawing.Point(15, 406);
+            this.btnRefresh.Margin = new System.Windows.Forms.Padding(2);
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(93, 32);
+            this.btnRefresh.TabIndex = 2;
+            this.btnRefresh.Text = "Обновить";
+            this.btnRefresh.UseVisualStyleBackColor = false;
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnAdd.FlatAppearance.BorderSize = 0;
+            this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAdd.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnAdd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnAdd.Location = new System.Drawing.Point(112, 406);
+            this.btnAdd.Margin = new System.Windows.Forms.Padding(2);
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Size = new System.Drawing.Size(95, 32);
+            this.btnAdd.TabIndex = 3;
+            this.btnAdd.Text = "Добавить";
+            this.btnAdd.UseVisualStyleBackColor = false;
+            // 
+            // btnEdit
+            // 
+            this.btnEdit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnEdit.FlatAppearance.BorderSize = 0;
+            this.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnEdit.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnEdit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnEdit.Location = new System.Drawing.Point(211, 406);
+            this.btnEdit.Margin = new System.Windows.Forms.Padding(2);
+            this.btnEdit.Name = "btnEdit";
+            this.btnEdit.Size = new System.Drawing.Size(140, 32);
+            this.btnEdit.TabIndex = 4;
+            this.btnEdit.Text = "Редактировать";
+            this.btnEdit.UseVisualStyleBackColor = false;
+            // 
+            // btnDelete
+            // 
+            this.btnDelete.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnDelete.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnDelete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnDelete.Location = new System.Drawing.Point(355, 406);
+            this.btnDelete.Margin = new System.Windows.Forms.Padding(2);
+            this.btnDelete.Name = "btnDelete";
+            this.btnDelete.Size = new System.Drawing.Size(82, 32);
+            this.btnDelete.TabIndex = 5;
+            this.btnDelete.Text = "Удалить";
+            this.btnDelete.UseVisualStyleBackColor = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.Location = new System.Drawing.Point(570, 406);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(90, 32);
+            this.btnBack.TabIndex = 6;
+            this.btnBack.Text = "< Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(285, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(109, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Клиенты";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(675, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // ClientsForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(675, 455);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnDelete);
+            this.Controls.Add(this.btnEdit);
+            this.Controls.Add(this.btnAdd);
+            this.Controls.Add(this.btnRefresh);
+            this.Controls.Add(this.dgvClients);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2);
+            this.MaximizeBox = false;
+            this.Name = "ClientsForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Клиенты - Обработка заявок";
+            ((System.ComponentModel.ISupportInitialize)(this.dgvClients)).EndInit();
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        private System.Windows.Forms.DataGridView dgvClients;
+        private System.Windows.Forms.Button btnRefresh;
+        private System.Windows.Forms.Button btnAdd;
+        private System.Windows.Forms.Button btnEdit;
+        private System.Windows.Forms.Button btnDelete;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 145 - 0
ClientsForm.cs

@@ -0,0 +1,145 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class ClientsForm : Form
+    {
+        private DataTable clientsTable;
+
+        public ClientsForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+            LoadClients();
+            ConfigureGrid();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnRefresh.Click += BtnRefresh_Click;
+            btnAdd.Click += BtnAdd_Click;
+            btnEdit.Click += BtnEdit_Click;
+            btnDelete.Click += BtnDelete_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private void LoadClients()
+        {
+            clientsTable = DatabaseHelper.GetClients();
+            dgvClients.DataSource = clientsTable;
+            ConfigureGrid();
+        }
+
+        private void ConfigureGrid()
+        {
+            if (dgvClients.Columns.Count == 0) return;
+
+            // Настройка заголовков
+            if (dgvClients.Columns.Contains("id"))
+                dgvClients.Columns["id"].HeaderText = "ID";
+
+            if (dgvClients.Columns.Contains("last_name"))
+                dgvClients.Columns["last_name"].HeaderText = "Фамилия";
+
+            if (dgvClients.Columns.Contains("first_name"))
+                dgvClients.Columns["first_name"].HeaderText = "Имя";
+
+            if (dgvClients.Columns.Contains("middle_name"))
+                dgvClients.Columns["middle_name"].HeaderText = "Отчество";
+
+            if (dgvClients.Columns.Contains("phone"))
+                dgvClients.Columns["phone"].HeaderText = "Телефон";
+
+            // Настройка цвета строк
+            dgvClients.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvClients.DefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            dgvClients.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvClients.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvClients.ColumnHeadersDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvClients.ColumnHeadersDefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvClients.EnableHeadersVisualStyles = false;
+
+            dgvClients.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
+        }
+
+        private void BtnRefresh_Click(object sender, EventArgs e)
+        {
+            LoadClients();
+        }
+
+        private void BtnAdd_Click(object sender, EventArgs e)
+        {
+            ClientEditForm form = new ClientEditForm();
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadClients();
+                MessageBox.Show("Клиент успешно добавлен", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnEdit_Click(object sender, EventArgs e)
+        {
+            if (dgvClients.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите клиента для редактирования", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int clientId = Convert.ToInt32(dgvClients.CurrentRow.Cells["client_id"].Value);
+            string lastName = dgvClients.CurrentRow.Cells["last_name"].Value.ToString();
+            string firstName = dgvClients.CurrentRow.Cells["first_name"].Value.ToString();
+            string middleName = dgvClients.CurrentRow.Cells["middle_name"].Value?.ToString();
+            string phone = dgvClients.CurrentRow.Cells["phone"].Value.ToString();
+
+            ClientEditForm form = new ClientEditForm(clientId, lastName, firstName, middleName, phone);
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadClients();
+                MessageBox.Show("Клиент успешно обновлён", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnDelete_Click(object sender, EventArgs e)
+        {
+            if (dgvClients.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите клиента для удаления", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int clientId = Convert.ToInt32(dgvClients.CurrentRow.Cells["client_id"].Value);
+            string clientName = dgvClients.CurrentRow.Cells["last_name"].Value.ToString() + " " +
+                                dgvClients.CurrentRow.Cells["first_name"].Value.ToString();
+
+            DialogResult result = MessageBox.Show($"Удалить клиента {clientName}?",
+                "Подтверждение удаления", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+
+            if (result == DialogResult.Yes)
+            {
+                if (DatabaseHelper.DeleteClient(clientId))
+                {
+                    LoadClients();
+                    MessageBox.Show("Клиент успешно удалён", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при удалении клиента", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 120 - 0
ClientsForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 657 - 0
DatabaseHelper.cs

@@ -0,0 +1,657 @@
+using System;
+using System.Data;
+using System.Security.Cryptography;
+using System.Text;
+using Npgsql;
+using System.Configuration;
+using System.Windows.Forms;
+
+namespace WindowsFormsApp4
+{
+    public static class DatabaseHelper
+    {
+        private static string connectionString = ConfigurationManager.ConnectionStrings["PostgreSQL"].ConnectionString;
+
+        public static NpgsqlConnection GetConnection()
+        {
+            return new NpgsqlConnection(connectionString);
+        }
+
+        public static bool TestConnection()
+        {
+            try
+            {
+                using (var conn = GetConnection())
+                {
+                    conn.Open();
+                    return true;
+                }
+            }
+            catch (Exception ex)
+            {
+                System.Diagnostics.Debug.WriteLine($"Ошибка подключения: {ex.Message}");
+                return false;
+            }
+        }
+
+        public static string HashPassword(string password)
+        {
+            using (SHA256 sha256 = SHA256.Create())
+            {
+                byte[] bytes = sha256.ComputeHash(Encoding.UTF8.GetBytes(password));
+                StringBuilder builder = new StringBuilder();
+                foreach (byte b in bytes)
+                    builder.Append(b.ToString("x2"));
+                return builder.ToString();
+            }
+        }
+
+        public class User
+        {
+            public int UserId { get; set; }
+            public string LastName { get; set; }
+            public string FirstName { get; set; }
+            public string MiddleName { get; set; }
+            public string Phone { get; set; }
+            public string Role { get; set; }
+            public bool IsActive { get; set; }
+            public int? ClientId { get; set; }
+            public int? ManagerId { get; set; }
+        }
+
+        public static User Authenticate(string login, string password)
+        {
+            string passwordHash = HashPassword(password);
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+                    SELECT u.user_id, u.last_name, u.first_name, u.middle_name, 
+                           u.phone, u.role_name, u.is_active, u.client_id, u.manager_id
+                    FROM users u
+                    JOIN user_auth a ON u.user_id = a.user_id
+                    WHERE a.login = @login AND a.password_hash = @password_hash AND u.is_active = true";
+
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@login", login);
+                    cmd.Parameters.AddWithValue("@password_hash", passwordHash);
+
+                    using (var reader = cmd.ExecuteReader())
+                    {
+                        if (reader.Read())
+                        {
+                            return new User
+                            {
+                                UserId = reader.GetInt32(0),
+                                LastName = reader.GetString(1),
+                                FirstName = reader.GetString(2),
+                                MiddleName = reader.IsDBNull(3) ? null : reader.GetString(3),
+                                Phone = reader.GetString(4),
+                                Role = reader.GetString(5),
+                                IsActive = reader.GetBoolean(6),
+                                ClientId = reader.IsDBNull(7) ? null : (int?)reader.GetInt32(7),
+                                ManagerId = reader.IsDBNull(8) ? null : (int?)reader.GetInt32(8)
+                            };
+                        }
+                    }
+                }
+            }
+            return null;
+        }
+
+        public static DataTable GetRequests(int userId, string role, int? clientId = null, int? managerId = null)
+        {
+            DataTable dt = new DataTable();
+            string sql;
+
+            if (role == "admin")
+            {
+                sql = @"
+            SELECT r.id, c.last_name || ' ' || c.first_name AS client_name,
+                   COALESCE(m.last_name || ' ' || m.first_name, 'Не назначен') AS manager_name,
+                   r.request_date, r.measurement_datetime, r.status
+            FROM request r
+            LEFT JOIN client c ON r.client_id = c.client_id
+            LEFT JOIN manager m ON r.manager_id = m.id
+            ORDER BY r.request_date DESC";
+            }
+            else if (role == "manager" && managerId.HasValue)
+            {
+                sql = @"
+        SELECT r.id, c.last_name || ' ' || c.first_name AS client_name,
+               r.request_date, r.measurement_datetime, r.status
+        FROM request r
+        JOIN client c ON r.client_id = c.client_id
+        WHERE r.status = 'new' OR r.manager_id = @managerId
+        ORDER BY r.request_date DESC";
+            }
+            else if (role == "client" && clientId.HasValue)
+            {
+                sql = @"
+            SELECT r.id, r.request_date, r.measurement_datetime, r.status
+            FROM request r
+            WHERE r.client_id = @clientId
+            ORDER BY r.request_date DESC";
+            }
+            else
+            {
+                return dt;
+            }
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    if (role == "manager" && managerId.HasValue)
+                        cmd.Parameters.AddWithValue("@managerId", managerId.Value);
+                    if (role == "client" && clientId.HasValue)
+                        cmd.Parameters.AddWithValue("@clientId", clientId.Value);
+
+                    using (var adapter = new NpgsqlDataAdapter(cmd))
+                    {
+                        adapter.Fill(dt);
+                    }
+                }
+            }
+            return dt;
+        }
+        public static bool UpdateRequestStatus(int requestId, string newStatus)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "UPDATE request SET status = @status WHERE id = @id";  
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@status", newStatus);
+                    cmd.Parameters.AddWithValue("@id", requestId);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+
+        public static DataTable GetClients()
+        {
+            DataTable dt = new DataTable();
+            string sql = "SELECT client_id, last_name, first_name, middle_name, phone FROM client ORDER BY last_name";
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var adapter = new NpgsqlDataAdapter(sql, conn))
+                {
+                    adapter.Fill(dt);
+                }
+            }
+            return dt;
+        }
+
+        public static DataTable GetManagers()
+        {
+            DataTable dt = new DataTable();
+            string sql = "SELECT id AS manager_id, last_name, first_name, phone FROM manager ORDER BY last_name";
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var adapter = new NpgsqlDataAdapter(sql, conn))
+                {
+                    adapter.Fill(dt);
+                }
+            }
+            return dt;
+        }
+
+        public static DataTable GetManagerStatistics()
+        {
+            DataTable dt = new DataTable();
+            string sql = @"SELECT * FROM zimogorov_aa.manager_statistics ORDER BY completed_requests DESC";
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var adapter = new NpgsqlDataAdapter(sql, conn))
+                {
+                    adapter.Fill(dt);
+                }
+            }
+            return dt;
+        }
+
+        public static DataTable GetManagerPerformance(DateTime startDate, DateTime endDate)
+        {
+            DataTable dt = new DataTable();
+            string sql = @"SELECT * FROM zimogorov_aa.get_manager_performance(@start_date::date, @end_date::date)";
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@start_date", startDate);
+                    cmd.Parameters.AddWithValue("@end_date", endDate);
+                    using (var adapter = new NpgsqlDataAdapter(cmd))
+                    {
+                        adapter.Fill(dt);
+                    }
+                }
+            }
+            return dt;
+        }
+
+        public static int AddClient(string lastName, string firstName, string middleName, string phone)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO client (last_name, first_name, middle_name, phone) 
+            VALUES (@last_name, @first_name, @middle_name, @phone)
+            RETURNING client_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@last_name", lastName);
+                    cmd.Parameters.AddWithValue("@first_name", firstName);
+                    cmd.Parameters.AddWithValue("@middle_name", string.IsNullOrEmpty(middleName) ? (object)DBNull.Value : middleName);
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    return (int)cmd.ExecuteScalar();
+                }
+            }
+        }
+
+        public static int AddManager(string lastName, string firstName, string middleName, string phone)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO manager (last_name, first_name, middle_name, phone) 
+            VALUES (@last_name, @first_name, @middle_name, @phone)
+            RETURNING id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@last_name", lastName);
+                    cmd.Parameters.AddWithValue("@first_name", firstName);
+                    cmd.Parameters.AddWithValue("@middle_name", string.IsNullOrEmpty(middleName) ? (object)DBNull.Value : middleName);
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    return (int)cmd.ExecuteScalar();  
+                }
+            }
+        }
+
+        public static bool DeleteClient(int clientId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "DELETE FROM client WHERE client_id = @client_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+
+        public static bool DeleteManager(int managerId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "DELETE FROM manager WHERE id = @id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@id", managerId);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+        public static bool LoginExists(string login)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "SELECT COUNT(*) FROM user_auth WHERE login = @login";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@login", login);
+                    long count = (long)cmd.ExecuteScalar();
+                    return count > 0;
+                }
+            }
+        }
+
+        public static bool PhoneExists(string phone)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "SELECT COUNT(*) FROM client WHERE phone = @phone";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    long count = (long)cmd.ExecuteScalar();
+                    return count > 0;
+                }
+            }
+        }
+
+        public static int RegisterClient(string lastName, string firstName, string middleName, string phone)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO client (last_name, first_name, middle_name, phone) 
+            VALUES (@last_name, @first_name, @middle_name, @phone)
+            RETURNING client_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@last_name", lastName);
+                    cmd.Parameters.AddWithValue("@first_name", firstName);
+                    cmd.Parameters.AddWithValue("@middle_name", string.IsNullOrEmpty(middleName) ? (object)DBNull.Value : middleName);
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    return (int)cmd.ExecuteScalar();
+                }
+            }
+        }
+
+        public static int CreateUser(string lastName, string firstName, string middleName, string phone, string role, int? clientId, int? managerId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO users (last_name, first_name, middle_name, phone, role_name, client_id, manager_id, created_at, is_active) 
+            VALUES (@last_name, @first_name, @middle_name, @phone, @role::user_role, @client_id, @manager_id, CURRENT_DATE, true)
+            RETURNING user_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@last_name", lastName);
+                    cmd.Parameters.AddWithValue("@first_name", firstName);
+                    cmd.Parameters.AddWithValue("@middle_name", string.IsNullOrEmpty(middleName) ? (object)DBNull.Value : middleName);
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    cmd.Parameters.AddWithValue("@role", role);
+                    cmd.Parameters.AddWithValue("@client_id", clientId.HasValue ? (object)clientId.Value : DBNull.Value);
+                    cmd.Parameters.AddWithValue("@manager_id", managerId.HasValue ? (object)managerId.Value : DBNull.Value);
+                    return (int)cmd.ExecuteScalar();
+                }
+            }
+        }
+
+        public static bool CreateUserAuth(int userId, string login, string password)
+        {
+            string passwordHash = HashPassword(password);
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO user_auth (user_id, login, password_hash, created_at, is_current) 
+            VALUES (@user_id, @login, @password_hash, CURRENT_TIMESTAMP, true)";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@user_id", userId);
+                    cmd.Parameters.AddWithValue("@login", login);
+                    cmd.Parameters.AddWithValue("@password_hash", passwordHash);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+        public static bool UpdateClient(int clientId, string lastName, string firstName, string middleName, string phone)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            UPDATE client 
+            SET last_name = @last_name, 
+                first_name = @first_name, 
+                middle_name = @middle_name, 
+                phone = @phone 
+            WHERE client_id = @client_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    cmd.Parameters.AddWithValue("@last_name", lastName);
+                    cmd.Parameters.AddWithValue("@first_name", firstName);
+                    cmd.Parameters.AddWithValue("@middle_name", string.IsNullOrEmpty(middleName) ? (object)DBNull.Value : middleName);
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+
+
+        public static bool UpdateManager(int managerId, string lastName, string firstName, string middleName, string phone)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            UPDATE manager 
+            SET last_name = @last_name, 
+                first_name = @first_name, 
+                middle_name = @middle_name, 
+                phone = @phone 
+            WHERE id = @id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@id", managerId);
+                    cmd.Parameters.AddWithValue("@last_name", lastName);
+                    cmd.Parameters.AddWithValue("@first_name", firstName);
+                    cmd.Parameters.AddWithValue("@middle_name", string.IsNullOrEmpty(middleName) ? (object)DBNull.Value : middleName);
+                    cmd.Parameters.AddWithValue("@phone", phone);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+
+        public static int GetManagerActiveRequests(int managerId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "SELECT COUNT(*) FROM request WHERE manager_id = @manager_id AND status IN ('new', 'in_progress')";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@manager_id", managerId);
+                    return Convert.ToInt32(cmd.ExecuteScalar());
+                }
+            }
+        }
+
+        public static DataTable GetClientAddresses(int clientId)
+        {
+            DataTable dt = new DataTable();
+            string sql = @"
+        SELECT a.id AS address_id, 
+               a.city || ', ' || a.street || ', ' || a.house || 
+               CASE WHEN a.apartment IS NOT NULL AND a.apartment != '' 
+                    THEN ', кв. ' || a.apartment 
+                    ELSE '' END AS address_text
+        FROM client_address ca
+        JOIN address a ON ca.address_id = a.id
+        WHERE ca.client_id = @client_id
+        ORDER BY ca.priority ASC";
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    using (var adapter = new NpgsqlDataAdapter(cmd))
+                    {
+                        adapter.Fill(dt);
+                    }
+                }
+            }
+            return dt;
+        }
+
+        public static int CreateRequest(int clientId, DateTime measurementDateTime)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO request (client_id, request_date, measurement_datetime, status) 
+            VALUES (@client_id, CURRENT_DATE, @measurement_datetime, 'new')
+            RETURNING id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    cmd.Parameters.AddWithValue("@measurement_datetime", measurementDateTime);
+                    return (int)cmd.ExecuteScalar();
+                }
+            }
+        }
+
+        public static DataTable GetClientAddressesWithDetails(int clientId)
+        {
+            DataTable dt = new DataTable();
+            string sql = @"
+        SELECT a.id AS address_id, a.city, a.street, a.house, a.building, a.apartment,
+               ca.address_type, ca.priority
+        FROM client_address ca
+        JOIN address a ON ca.address_id = a.id
+        WHERE ca.client_id = @client_id
+        ORDER BY ca.priority ASC";
+
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    using (var adapter = new NpgsqlDataAdapter(cmd))
+                    {
+                        adapter.Fill(dt);
+                    }
+                }
+            }
+            return dt;
+        }
+        public static int AddAddress(string city, string street, string house, string building, string apartment)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO address (city, street, house, building, apartment) 
+            VALUES (@city, @street, @house, @building, @apartment)
+            RETURNING id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@city", city);
+                    cmd.Parameters.AddWithValue("@street", street);
+                    cmd.Parameters.AddWithValue("@house", house);
+                    cmd.Parameters.AddWithValue("@building", string.IsNullOrEmpty(building) ? (object)DBNull.Value : building);
+                    cmd.Parameters.AddWithValue("@apartment", string.IsNullOrEmpty(apartment) ? (object)DBNull.Value : apartment);
+                    return (int)cmd.ExecuteScalar();
+                }
+            }
+        }
+
+        public static bool UpdateAddress(int addressId, string city, string street, string house, string building, string apartment)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            UPDATE address 
+            SET city = @city, street = @street, house = @house, 
+                building = @building, apartment = @apartment 
+            WHERE id = @id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@id", addressId);
+                    cmd.Parameters.AddWithValue("@city", city);
+                    cmd.Parameters.AddWithValue("@street", street);
+                    cmd.Parameters.AddWithValue("@house", house);
+                    cmd.Parameters.AddWithValue("@building", string.IsNullOrEmpty(building) ? (object)DBNull.Value : building);
+                    cmd.Parameters.AddWithValue("@apartment", string.IsNullOrEmpty(apartment) ? (object)DBNull.Value : apartment);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+
+        public static bool AddClientAddress(int clientId, int addressId, string addressType, int priority)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = @"
+            INSERT INTO client_address (client_id, address_id, address_type, priority) 
+            VALUES (@client_id, @address_id, @address_type, @priority)";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    cmd.Parameters.AddWithValue("@address_id", addressId);
+                    cmd.Parameters.AddWithValue("@address_type", addressType);
+                    cmd.Parameters.AddWithValue("@priority", priority);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+
+        public static bool DeleteClientAddress(int clientId, int addressId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "DELETE FROM client_address WHERE client_id = @client_id AND address_id = @address_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@client_id", clientId);
+                    cmd.Parameters.AddWithValue("@address_id", addressId);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+        public static bool SetMainAddress(int clientId, int addressId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                using (var trans = conn.BeginTransaction())
+                {
+                    string sqlReset = "UPDATE client_address SET priority = 10 WHERE client_id = @client_id";
+                    using (var cmdReset = new NpgsqlCommand(sqlReset, conn, trans))
+                    {
+                        cmdReset.Parameters.AddWithValue("@client_id", clientId);
+                        cmdReset.ExecuteNonQuery();
+                    }
+
+                    string sqlSet = "UPDATE client_address SET priority = 1 WHERE client_id = @client_id AND address_id = @address_id";
+                    using (var cmdSet = new NpgsqlCommand(sqlSet, conn, trans))
+                    {
+                        cmdSet.Parameters.AddWithValue("@client_id", clientId);
+                        cmdSet.Parameters.AddWithValue("@address_id", addressId);
+                        cmdSet.ExecuteNonQuery();
+                    }
+
+                    trans.Commit();
+                    return true;
+                }
+            }
+        }
+        public static bool AssignManagerToRequest(int requestId, int managerId)
+        {
+            using (var conn = GetConnection())
+            {
+                conn.Open();
+                string sql = "UPDATE request SET manager_id = @manager_id WHERE id = @request_id";
+                using (var cmd = new NpgsqlCommand(sql, conn))
+                {
+                    cmd.Parameters.AddWithValue("@request_id", requestId);
+                    cmd.Parameters.AddWithValue("@manager_id", managerId);
+                    return cmd.ExecuteNonQuery() > 0;
+                }
+            }
+        }
+    }
+}

+ 166 - 0
LoginForm.Designer.cs

@@ -0,0 +1,166 @@
+namespace WindowsFormsApp4
+{
+    partial class LoginForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.txtLogin = new System.Windows.Forms.TextBox();
+            this.txtPassword = new System.Windows.Forms.TextBox();
+            this.btnLogin = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblLogin = new System.Windows.Forms.Label();
+            this.lblPassword = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // txtLogin
+            // 
+            this.txtLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtLogin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtLogin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtLogin.Location = new System.Drawing.Point(112, 79);
+            this.txtLogin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtLogin.Name = "txtLogin";
+            this.txtLogin.Size = new System.Drawing.Size(136, 23);
+            this.txtLogin.TabIndex = 2;
+            // 
+            // txtPassword
+            // 
+            this.txtPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtPassword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtPassword.Location = new System.Drawing.Point(112, 115);
+            this.txtPassword.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtPassword.Name = "txtPassword";
+            this.txtPassword.Size = new System.Drawing.Size(136, 23);
+            this.txtPassword.TabIndex = 4;
+            this.txtPassword.UseSystemPasswordChar = true;
+            // 
+            // btnLogin
+            // 
+            this.btnLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnLogin.FlatAppearance.BorderSize = 0;
+            this.btnLogin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnLogin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnLogin.Location = new System.Drawing.Point(60, 162);
+            this.btnLogin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnLogin.Name = "btnLogin";
+            this.btnLogin.Size = new System.Drawing.Size(82, 32);
+            this.btnLogin.TabIndex = 5;
+            this.btnLogin.Text = "Вход";
+            this.btnLogin.UseVisualStyleBackColor = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.FlatAppearance.BorderSize = 0;
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.Location = new System.Drawing.Point(158, 162);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(82, 32);
+            this.btnBack.TabIndex = 6;
+            this.btnBack.Text = "Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblLogin
+            // 
+            this.lblLogin.AutoSize = true;
+            this.lblLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblLogin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblLogin.Location = new System.Drawing.Point(60, 81);
+            this.lblLogin.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblLogin.Name = "lblLogin";
+            this.lblLogin.Size = new System.Drawing.Size(51, 17);
+            this.lblLogin.TabIndex = 1;
+            this.lblLogin.Text = "Логин:";
+            // 
+            // lblPassword
+            // 
+            this.lblPassword.AutoSize = true;
+            this.lblPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblPassword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblPassword.Location = new System.Drawing.Point(52, 118);
+            this.lblPassword.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblPassword.Name = "lblPassword";
+            this.lblPassword.Size = new System.Drawing.Size(61, 17);
+            this.lblPassword.TabIndex = 3;
+            this.lblPassword.Text = "Пароль:";
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(90, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(156, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Авторизация";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(300, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // LoginForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(300, 228);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnLogin);
+            this.Controls.Add(this.txtPassword);
+            this.Controls.Add(this.lblPassword);
+            this.Controls.Add(this.txtLogin);
+            this.Controls.Add(this.lblLogin);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "LoginForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Вход в систему";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.TextBox txtLogin;
+        private System.Windows.Forms.TextBox txtPassword;
+        private System.Windows.Forms.Button btnLogin;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblLogin;
+        private System.Windows.Forms.Label lblPassword;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 60 - 0
LoginForm.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Windows.Forms;
+
+namespace WindowsFormsApp4
+{
+    public partial class LoginForm : Form
+    {
+        public LoginForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnLogin.Click += BtnLogin_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private void BtnLogin_Click(object sender, EventArgs e)
+        {
+            string login = txtLogin.Text.Trim();
+            string password = txtPassword.Text;
+
+            if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password))
+            {
+                MessageBox.Show("Введите логин и пароль", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            var user = DatabaseHelper.Authenticate(login, password);
+
+            if (user != null)
+            {
+                Session.CurrentUser = user;
+                MessageBox.Show($"Добро пожаловать, {user.FirstName} {user.LastName}!",
+                    "Успешно", MessageBoxButtons.OK, MessageBoxIcon.Information);
+
+                MainForm mainForm = new MainForm();
+                mainForm.Show();
+                this.Hide();
+
+             
+            }
+            else
+            {
+                MessageBox.Show("Неверный логин или пароль",
+                    "Ошибка авторизации", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            StartForm startForm = new StartForm();
+            startForm.Show();
+            this.Close();
+        }
+    }
+}

+ 120 - 0
LoginForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 162 - 0
Main.Designer.cs

@@ -0,0 +1,162 @@
+namespace WindowsFormsApp4
+{
+    partial class MainForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.lblWelcome = new System.Windows.Forms.Label();
+            this.lblUserInfo = new System.Windows.Forms.Label();
+            this.btnRequests = new System.Windows.Forms.Button();
+            this.btnClients = new System.Windows.Forms.Button();
+            this.btnManagers = new System.Windows.Forms.Button();
+            this.btnReports = new System.Windows.Forms.Button();
+            this.btnAddresses = new System.Windows.Forms.Button();
+            this.btnLogout = new System.Windows.Forms.Button();
+            this.SuspendLayout();
+            // 
+            // lblWelcome
+            // 
+            this.lblWelcome.AutoSize = true;
+            this.lblWelcome.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblWelcome.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblWelcome.Location = new System.Drawing.Point(20, 20);
+            this.lblWelcome.Name = "lblWelcome";
+            this.lblWelcome.Size = new System.Drawing.Size(216, 26);
+            this.lblWelcome.TabIndex = 7;
+            this.lblWelcome.Text = "Обработка заявок";
+            // 
+            // lblUserInfo
+            // 
+            this.lblUserInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+            this.lblUserInfo.AutoSize = true;
+            this.lblUserInfo.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblUserInfo.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblUserInfo.Location = new System.Drawing.Point(420, 25);
+            this.lblUserInfo.Name = "lblUserInfo";
+            this.lblUserInfo.Size = new System.Drawing.Size(105, 17);
+            this.lblUserInfo.TabIndex = 6;
+            this.lblUserInfo.Text = "Пользователь:";
+            // 
+            // btnRequests
+            // 
+            this.btnRequests.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnRequests.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRequests.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnRequests.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRequests.Location = new System.Drawing.Point(180, 80);
+            this.btnRequests.Name = "btnRequests";
+            this.btnRequests.Size = new System.Drawing.Size(240, 50);
+            this.btnRequests.TabIndex = 5;
+            this.btnRequests.Text = "Заявки";
+            this.btnRequests.UseVisualStyleBackColor = false;
+            // 
+            // btnClients
+            // 
+            this.btnClients.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnClients.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnClients.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnClients.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnClients.Location = new System.Drawing.Point(180, 140);
+            this.btnClients.Name = "btnClients";
+            this.btnClients.Size = new System.Drawing.Size(240, 50);
+            this.btnClients.TabIndex = 4;
+            this.btnClients.Text = "Клиенты";
+            this.btnClients.UseVisualStyleBackColor = false;
+            // 
+            // btnManagers
+            // 
+            this.btnManagers.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnManagers.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnManagers.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnManagers.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnManagers.Location = new System.Drawing.Point(180, 200);
+            this.btnManagers.Name = "btnManagers";
+            this.btnManagers.Size = new System.Drawing.Size(240, 50);
+            this.btnManagers.TabIndex = 3;
+            this.btnManagers.Text = "Менеджеры";
+            this.btnManagers.UseVisualStyleBackColor = false;
+            // 
+            // btnReports
+            // 
+            this.btnReports.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnReports.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnReports.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnReports.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnReports.Location = new System.Drawing.Point(180, 260);
+            this.btnReports.Name = "btnReports";
+            this.btnReports.Size = new System.Drawing.Size(240, 50);
+            this.btnReports.TabIndex = 2;
+            this.btnReports.Text = "Отчёты";
+            this.btnReports.UseVisualStyleBackColor = false;
+            // 
+            // btnAddresses
+            // 
+            this.btnAddresses.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnAddresses.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAddresses.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnAddresses.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnAddresses.Location = new System.Drawing.Point(180, 320);
+            this.btnAddresses.Name = "btnAddresses";
+            this.btnAddresses.Size = new System.Drawing.Size(240, 50);
+            this.btnAddresses.TabIndex = 1;
+            this.btnAddresses.Text = "Мои адреса";
+            this.btnAddresses.UseVisualStyleBackColor = false;
+            // 
+            // btnLogout
+            // 
+            this.btnLogout.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnLogout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnLogout.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnLogout.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnLogout.Location = new System.Drawing.Point(180, 380);
+            this.btnLogout.Name = "btnLogout";
+            this.btnLogout.Size = new System.Drawing.Size(240, 50);
+            this.btnLogout.TabIndex = 0;
+            this.btnLogout.Text = "Выход";
+            this.btnLogout.UseVisualStyleBackColor = false;
+            // 
+            // MainForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(600, 470);
+            this.Controls.Add(this.btnLogout);
+            this.Controls.Add(this.btnAddresses);
+            this.Controls.Add(this.btnReports);
+            this.Controls.Add(this.btnManagers);
+            this.Controls.Add(this.btnClients);
+            this.Controls.Add(this.btnRequests);
+            this.Controls.Add(this.lblUserInfo);
+            this.Controls.Add(this.lblWelcome);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.MaximizeBox = false;
+            this.Name = "MainForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Главное меню - Обработка заявок";
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.Label lblWelcome;
+        private System.Windows.Forms.Label lblUserInfo;
+        private System.Windows.Forms.Button btnRequests;
+        private System.Windows.Forms.Button btnClients;
+        private System.Windows.Forms.Button btnManagers;
+        private System.Windows.Forms.Button btnReports;
+        private System.Windows.Forms.Button btnAddresses;
+        private System.Windows.Forms.Button btnLogout;
+    }
+}

+ 115 - 0
Main.cs

@@ -0,0 +1,115 @@
+using System;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class MainForm : Form
+    {
+        public MainForm()
+        {
+            InitializeComponent();
+            ConfigureMenuByRole();
+            SetUserInfo();
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnRequests.Click += BtnRequests_Click;
+            btnClients.Click += BtnClients_Click;
+            btnManagers.Click += BtnManagers_Click;
+            btnReports.Click += BtnReports_Click;
+            btnAddresses.Click += BtnAddresses_Click;
+            btnLogout.Click += BtnLogout_Click;
+        }
+
+        private void SetUserInfo()
+        {
+            if (Session.CurrentUser != null)
+            {
+                lblUserInfo.Text = $"{Session.CurrentUser.FirstName} {Session.CurrentUser.LastName} ({GetRoleName(Session.CurrentUser.Role)})";
+            }
+        }
+
+        private string GetRoleName(string role)
+        {
+            switch (role)
+            {
+                case "admin": return "Администратор";
+                case "manager": return "Менеджер";
+                case "client": return "Клиент";
+                default: return role;
+            }
+        }
+
+        private void ConfigureMenuByRole()
+        {
+            // По умолчанию все кнопки скрыты
+            btnClients.Visible = false;
+            btnManagers.Visible = false;
+            btnReports.Visible = false;
+            btnAddresses.Visible = false;
+            btnRequests.Visible = true; // Заявки видят все
+
+            if (Session.IsAdmin)
+            {
+                btnClients.Visible = true;
+                btnManagers.Visible = true;
+                btnReports.Visible = true;
+            }
+            else if (Session.IsManager)
+            {
+                btnReports.Visible = true;
+            }
+            else if (Session.IsClient)
+            {
+                btnAddresses.Visible = true;
+            }
+        }
+
+        private void BtnRequests_Click(object sender, EventArgs e)
+        {
+            RequestsForm requestsForm = new RequestsForm();
+            requestsForm.ShowDialog();
+        }
+
+        private void BtnClients_Click(object sender, EventArgs e)
+        {
+            ClientsForm clientsForm = new ClientsForm();
+            clientsForm.ShowDialog();
+        }
+
+        private void BtnManagers_Click(object sender, EventArgs e)
+        {
+            ManagersForm managersForm = new ManagersForm();
+            managersForm.ShowDialog();
+        }
+
+        private void BtnReports_Click(object sender, EventArgs e)
+        {
+            ReportForm reportForm = new ReportForm();
+            reportForm.ShowDialog();
+        }
+
+        private void BtnAddresses_Click(object sender, EventArgs e)
+        {
+            AddressesForm addressesForm = new AddressesForm();
+            addressesForm.ShowDialog();
+        }
+
+        private void BtnLogout_Click(object sender, EventArgs e)
+        {
+            DialogResult result = MessageBox.Show("Вы уверены, что хотите выйти?",
+                "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+
+            if (result == DialogResult.Yes)
+            {
+                Session.Logout();
+                StartForm startForm = new StartForm();
+                startForm.Show();
+                this.Close();
+            }
+        }
+    }
+}

+ 120 - 0
Main.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 227 - 0
ManagerEditForm.Designer.cs

@@ -0,0 +1,227 @@
+namespace WindowsFormsApp4
+{
+    partial class ManagerEditForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.txtLastName = new System.Windows.Forms.TextBox();
+            this.txtFirstName = new System.Windows.Forms.TextBox();
+            this.txtMiddleName = new System.Windows.Forms.TextBox();
+            this.txtPhone = new System.Windows.Forms.TextBox();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.lblLastName = new System.Windows.Forms.Label();
+            this.lblFirstName = new System.Windows.Forms.Label();
+            this.lblMiddleName = new System.Windows.Forms.Label();
+            this.lblPhone = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // txtLastName
+            // 
+            this.txtLastName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtLastName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtLastName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtLastName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtLastName.Location = new System.Drawing.Point(98, 63);
+            this.txtLastName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtLastName.Name = "txtLastName";
+            this.txtLastName.Size = new System.Drawing.Size(188, 23);
+            this.txtLastName.TabIndex = 2;
+            // 
+            // txtFirstName
+            // 
+            this.txtFirstName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtFirstName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtFirstName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtFirstName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtFirstName.Location = new System.Drawing.Point(98, 91);
+            this.txtFirstName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtFirstName.Name = "txtFirstName";
+            this.txtFirstName.Size = new System.Drawing.Size(188, 23);
+            this.txtFirstName.TabIndex = 4;
+            // 
+            // txtMiddleName
+            // 
+            this.txtMiddleName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtMiddleName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtMiddleName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtMiddleName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtMiddleName.Location = new System.Drawing.Point(98, 119);
+            this.txtMiddleName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtMiddleName.Name = "txtMiddleName";
+            this.txtMiddleName.Size = new System.Drawing.Size(188, 23);
+            this.txtMiddleName.TabIndex = 6;
+            // 
+            // txtPhone
+            // 
+            this.txtPhone.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtPhone.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtPhone.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtPhone.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtPhone.Location = new System.Drawing.Point(98, 148);
+            this.txtPhone.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtPhone.Name = "txtPhone";
+            this.txtPhone.Size = new System.Drawing.Size(188, 23);
+            this.txtPhone.TabIndex = 8;
+            // 
+            // btnSave
+            // 
+            this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnSave.FlatAppearance.BorderSize = 0;
+            this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnSave.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnSave.Location = new System.Drawing.Point(71, 195);
+            this.btnSave.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(100, 32);
+            this.btnSave.TabIndex = 9;
+            this.btnSave.Text = "Сохранить";
+            this.btnSave.UseVisualStyleBackColor = false;
+            this.btnSave.Click += new System.EventHandler(this.BtnSave_Click);
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnCancel.FlatAppearance.BorderSize = 0;
+            this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnCancel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnCancel.Location = new System.Drawing.Point(185, 195);
+            this.btnCancel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(100, 32);
+            this.btnCancel.TabIndex = 10;
+            this.btnCancel.Text = "Отмена";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
+            // 
+            // lblLastName
+            // 
+            this.lblLastName.AutoSize = true;
+            this.lblLastName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblLastName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblLastName.Location = new System.Drawing.Point(30, 65);
+            this.lblLastName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblLastName.Name = "lblLastName";
+            this.lblLastName.Size = new System.Drawing.Size(74, 17);
+            this.lblLastName.TabIndex = 1;
+            this.lblLastName.Text = "Фамилия:";
+            // 
+            // lblFirstName
+            // 
+            this.lblFirstName.AutoSize = true;
+            this.lblFirstName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblFirstName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblFirstName.Location = new System.Drawing.Point(52, 93);
+            this.lblFirstName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblFirstName.Name = "lblFirstName";
+            this.lblFirstName.Size = new System.Drawing.Size(39, 17);
+            this.lblFirstName.TabIndex = 3;
+            this.lblFirstName.Text = "Имя:";
+            // 
+            // lblMiddleName
+            // 
+            this.lblMiddleName.AutoSize = true;
+            this.lblMiddleName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblMiddleName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblMiddleName.Location = new System.Drawing.Point(34, 122);
+            this.lblMiddleName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblMiddleName.Name = "lblMiddleName";
+            this.lblMiddleName.Size = new System.Drawing.Size(75, 17);
+            this.lblMiddleName.TabIndex = 5;
+            this.lblMiddleName.Text = "Отчество:";
+            // 
+            // lblPhone
+            // 
+            this.lblPhone.AutoSize = true;
+            this.lblPhone.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblPhone.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblPhone.Location = new System.Drawing.Point(41, 150);
+            this.lblPhone.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblPhone.Name = "lblPhone";
+            this.lblPhone.Size = new System.Drawing.Size(72, 17);
+            this.lblPhone.TabIndex = 7;
+            this.lblPhone.Text = "Телефон:";
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(90, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(195, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Редактирование";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(338, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // ManagerEditForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(338, 260);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.txtPhone);
+            this.Controls.Add(this.lblPhone);
+            this.Controls.Add(this.txtMiddleName);
+            this.Controls.Add(this.lblMiddleName);
+            this.Controls.Add(this.txtFirstName);
+            this.Controls.Add(this.lblFirstName);
+            this.Controls.Add(this.txtLastName);
+            this.Controls.Add(this.lblLastName);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "ManagerEditForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Менеджер";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.TextBox txtLastName;
+        private System.Windows.Forms.TextBox txtFirstName;
+        private System.Windows.Forms.TextBox txtMiddleName;
+        private System.Windows.Forms.TextBox txtPhone;
+        private System.Windows.Forms.Button btnSave;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Label lblLastName;
+        private System.Windows.Forms.Label lblFirstName;
+        private System.Windows.Forms.Label lblMiddleName;
+        private System.Windows.Forms.Label lblPhone;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 119 - 0
ManagerEditForm.cs

@@ -0,0 +1,119 @@
+using System;
+using System.Text.RegularExpressions;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class ManagerEditForm : Form
+    {
+        private int? managerId;
+        private bool isEditMode;
+
+        public ManagerEditForm()
+        {
+            InitializeComponent();
+            isEditMode = false;
+            lblTitle.Text = "Добавление менеджера";
+            AttachEventHandlers();
+        }
+
+        public ManagerEditForm(int id, string lastName, string firstName, string middleName, string phone)
+        {
+            InitializeComponent();
+            isEditMode = true;
+            managerId = id;
+            lblTitle.Text = "Редактирование менеджера";
+            txtLastName.Text = lastName;
+            txtFirstName.Text = firstName;
+            txtMiddleName.Text = middleName;
+            txtPhone.Text = phone;
+            AttachEventHandlers();
+        }
+        private void BtnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+        private void AttachEventHandlers()
+        {
+            btnSave.Click += BtnSave_Click;
+            btnCancel.Click += BtnCancel_Click;
+        }
+
+        private bool ValidateFields()
+        {
+            if (string.IsNullOrWhiteSpace(txtLastName.Text))
+            {
+                MessageBox.Show("Введите фамилию", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtLastName.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtFirstName.Text))
+            {
+                MessageBox.Show("Введите имя", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtFirstName.Focus();
+                return false;
+            }
+
+            string phone = txtPhone.Text.Trim();
+            if (string.IsNullOrWhiteSpace(phone))
+            {
+                MessageBox.Show("Введите номер телефона", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return false;
+            }
+
+            Regex phoneRegex = new Regex(@"^(\+7|8)[0-9]{10}$");
+            if (!phoneRegex.IsMatch(phone))
+            {
+                MessageBox.Show("Некорректный номер телефона. Формат: +7XXXXXXXXXX или 8XXXXXXXXXX",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return false;
+            }
+
+            return true;
+        }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            if (!ValidateFields())
+                return;
+
+            bool result;
+            if (isEditMode && managerId.HasValue)
+            {
+                result = DatabaseHelper.UpdateManager(
+                    managerId.Value,
+                    txtLastName.Text.Trim(),
+                    txtFirstName.Text.Trim(),
+                    txtMiddleName.Text.Trim(),
+                    txtPhone.Text.Trim()
+                );
+            }
+            else
+            {
+                int newId = DatabaseHelper.AddManager(
+                    txtLastName.Text.Trim(),
+                    txtFirstName.Text.Trim(),
+                    txtMiddleName.Text.Trim(),
+                    txtPhone.Text.Trim()
+                );
+                result = newId > 0;  
+            }
+
+            if (result)
+            {
+                this.DialogResult = DialogResult.OK;
+                this.Close();
+            }
+            else
+            {
+                MessageBox.Show("Ошибка при сохранении", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+    }
+}

+ 120 - 0
ManagerEditForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 180 - 0
ManagersForm.Designer.cs

@@ -0,0 +1,180 @@
+namespace WindowsFormsApp4
+{
+    partial class ManagersForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.dgvManagers = new System.Windows.Forms.DataGridView();
+            this.btnRefresh = new System.Windows.Forms.Button();
+            this.btnAdd = new System.Windows.Forms.Button();
+            this.btnEdit = new System.Windows.Forms.Button();
+            this.btnDelete = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvManagers)).BeginInit();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // dgvManagers
+            // 
+            this.dgvManagers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dgvManagers.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.dgvManagers.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.dgvManagers.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvManagers.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.dgvManagers.Location = new System.Drawing.Point(15, 65);
+            this.dgvManagers.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.dgvManagers.Name = "dgvManagers";
+            this.dgvManagers.ReadOnly = true;
+            this.dgvManagers.RowHeadersVisible = false;
+            this.dgvManagers.RowTemplate.Height = 30;
+            this.dgvManagers.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvManagers.Size = new System.Drawing.Size(645, 325);
+            this.dgvManagers.TabIndex = 1;
+            // 
+            // btnRefresh
+            // 
+            this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnRefresh.FlatAppearance.BorderSize = 0;
+            this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnRefresh.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRefresh.Location = new System.Drawing.Point(15, 406);
+            this.btnRefresh.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(90, 32);
+            this.btnRefresh.TabIndex = 2;
+            this.btnRefresh.Text = "Обновить";
+            this.btnRefresh.UseVisualStyleBackColor = false;
+            // 
+            // btnAdd
+            // 
+            this.btnAdd.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnAdd.FlatAppearance.BorderSize = 0;
+            this.btnAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAdd.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnAdd.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnAdd.Location = new System.Drawing.Point(109, 406);
+            this.btnAdd.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnAdd.Name = "btnAdd";
+            this.btnAdd.Size = new System.Drawing.Size(102, 32);
+            this.btnAdd.TabIndex = 3;
+            this.btnAdd.Text = "Добавить";
+            this.btnAdd.UseVisualStyleBackColor = false;
+            // 
+            // btnEdit
+            // 
+            this.btnEdit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnEdit.FlatAppearance.BorderSize = 0;
+            this.btnEdit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnEdit.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnEdit.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnEdit.Location = new System.Drawing.Point(215, 406);
+            this.btnEdit.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnEdit.Name = "btnEdit";
+            this.btnEdit.Size = new System.Drawing.Size(131, 32);
+            this.btnEdit.TabIndex = 4;
+            this.btnEdit.Text = "Редактировать";
+            this.btnEdit.UseVisualStyleBackColor = false;
+            // 
+            // btnDelete
+            // 
+            this.btnDelete.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnDelete.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnDelete.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnDelete.Location = new System.Drawing.Point(350, 406);
+            this.btnDelete.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnDelete.Name = "btnDelete";
+            this.btnDelete.Size = new System.Drawing.Size(85, 32);
+            this.btnDelete.TabIndex = 5;
+            this.btnDelete.Text = "Удалить";
+            this.btnDelete.UseVisualStyleBackColor = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.Location = new System.Drawing.Point(570, 406);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(90, 32);
+            this.btnBack.TabIndex = 6;
+            this.btnBack.Text = "< Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(270, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(144, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Менеджеры";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(675, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // ManagersForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(675, 455);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnDelete);
+            this.Controls.Add(this.btnEdit);
+            this.Controls.Add(this.btnAdd);
+            this.Controls.Add(this.btnRefresh);
+            this.Controls.Add(this.dgvManagers);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "ManagersForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Менеджеры - Обработка заявок";
+            ((System.ComponentModel.ISupportInitialize)(this.dgvManagers)).EndInit();
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        private System.Windows.Forms.DataGridView dgvManagers;
+        private System.Windows.Forms.Button btnRefresh;
+        private System.Windows.Forms.Button btnAdd;
+        private System.Windows.Forms.Button btnEdit;
+        private System.Windows.Forms.Button btnDelete;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 155 - 0
ManagersForm.cs

@@ -0,0 +1,155 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class ManagersForm : Form
+    {
+        private DataTable managersTable;
+
+        public ManagersForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+            LoadManagers();
+            ConfigureGrid();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnRefresh.Click += BtnRefresh_Click;
+            btnAdd.Click += BtnAdd_Click;
+            btnEdit.Click += BtnEdit_Click;
+            btnDelete.Click += BtnDelete_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private void LoadManagers()
+        {
+            managersTable = DatabaseHelper.GetManagers();
+            dgvManagers.DataSource = managersTable;
+            ConfigureGrid();
+        }
+
+        private void ConfigureGrid()
+        {
+            if (dgvManagers.Columns.Count == 0) return;
+
+            // Настройка заголовков
+            if (dgvManagers.Columns.Contains("id"))
+                dgvManagers.Columns["id"].HeaderText = "ID";
+
+            if (dgvManagers.Columns.Contains("last_name"))
+                dgvManagers.Columns["last_name"].HeaderText = "Фамилия";
+
+            if (dgvManagers.Columns.Contains("first_name"))
+                dgvManagers.Columns["first_name"].HeaderText = "Имя";
+
+            if (dgvManagers.Columns.Contains("middle_name"))
+                dgvManagers.Columns["middle_name"].HeaderText = "Отчество";
+
+            if (dgvManagers.Columns.Contains("phone"))
+                dgvManagers.Columns["phone"].HeaderText = "Телефон";
+
+            // Настройка цвета строк
+            dgvManagers.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvManagers.DefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            dgvManagers.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvManagers.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvManagers.ColumnHeadersDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvManagers.ColumnHeadersDefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvManagers.EnableHeadersVisualStyles = false;
+
+            dgvManagers.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
+        }
+
+        private void BtnRefresh_Click(object sender, EventArgs e)
+        {
+            LoadManagers();
+        }
+
+        private void BtnAdd_Click(object sender, EventArgs e)
+        {
+            ManagerEditForm form = new ManagerEditForm();
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadManagers();
+                MessageBox.Show("Менеджер успешно добавлен", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnEdit_Click(object sender, EventArgs e)
+        {
+            if (dgvManagers.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите менеджера для редактирования", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int managerId = Convert.ToInt32(dgvManagers.CurrentRow.Cells["id"].Value);
+            string lastName = dgvManagers.CurrentRow.Cells["last_name"].Value.ToString();
+            string firstName = dgvManagers.CurrentRow.Cells["first_name"].Value.ToString();
+            string middleName = dgvManagers.CurrentRow.Cells["middle_name"].Value?.ToString();
+            string phone = dgvManagers.CurrentRow.Cells["phone"].Value.ToString();
+
+            ManagerEditForm form = new ManagerEditForm(managerId, lastName, firstName, middleName, phone);
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadManagers();
+                MessageBox.Show("Менеджер успешно обновлён", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnDelete_Click(object sender, EventArgs e)
+        {
+            if (dgvManagers.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите менеджера для удаления", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int managerId = Convert.ToInt32(dgvManagers.CurrentRow.Cells["id"].Value);
+            string managerName = dgvManagers.CurrentRow.Cells["last_name"].Value.ToString() + " " +
+                                 dgvManagers.CurrentRow.Cells["first_name"].Value.ToString();
+
+            // Проверка, есть ли у менеджера активные заявки
+            int activeRequests = DatabaseHelper.GetManagerActiveRequests(managerId);
+            if (activeRequests > 0)
+            {
+                MessageBox.Show($"Нельзя удалить менеджера {managerName}.\nУ него есть {activeRequests} активных заявок.",
+                    "Невозможно удалить", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            DialogResult result = MessageBox.Show($"Удалить менеджера {managerName}?",
+                "Подтверждение удаления", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
+
+            if (result == DialogResult.Yes)
+            {
+                if (DatabaseHelper.DeleteManager(managerId))
+                {
+                    LoadManagers();
+                    MessageBox.Show("Менеджер успешно удалён", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при удалении менеджера", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+
+    }
+}

+ 120 - 0
ManagersForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 184 - 0
NewRequestForm.Designer.cs

@@ -0,0 +1,184 @@
+namespace WindowsFormsApp4
+{
+    partial class NewRequestForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.dtpMeasurementDate = new System.Windows.Forms.DateTimePicker();
+            this.dtpMeasurementTime = new System.Windows.Forms.DateTimePicker();
+            this.cmbAddress = new System.Windows.Forms.ComboBox();
+            this.btnSave = new System.Windows.Forms.Button();
+            this.btnCancel = new System.Windows.Forms.Button();
+            this.lblAddress = new System.Windows.Forms.Label();
+            this.lblDate = new System.Windows.Forms.Label();
+            this.lblTime = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(450, 60);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.lblTitle.Location = new System.Drawing.Point(130, 15);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(200, 31);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Новая заявка";
+            // 
+            // lblAddress
+            // 
+            this.lblAddress.AutoSize = true;
+            this.lblAddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblAddress.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.lblAddress.Location = new System.Drawing.Point(40, 90);
+            this.lblAddress.Name = "lblAddress";
+            this.lblAddress.Size = new System.Drawing.Size(120, 20);
+            this.lblAddress.TabIndex = 1;
+            this.lblAddress.Text = "Адрес доставки:";
+            // 
+            // cmbAddress
+            // 
+            this.cmbAddress.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.cmbAddress.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+            this.cmbAddress.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.cmbAddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.cmbAddress.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.cmbAddress.Location = new System.Drawing.Point(170, 87);
+            this.cmbAddress.Name = "cmbAddress";
+            this.cmbAddress.Size = new System.Drawing.Size(230, 28);
+            this.cmbAddress.TabIndex = 2;
+            // 
+            // lblDate
+            // 
+            this.lblDate.AutoSize = true;
+            this.lblDate.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblDate.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.lblDate.Location = new System.Drawing.Point(70, 140);
+            this.lblDate.Name = "lblDate";
+            this.lblDate.Size = new System.Drawing.Size(90, 20);
+            this.lblDate.TabIndex = 3;
+            this.lblDate.Text = "Дата замера:";
+            // 
+            // dtpMeasurementDate
+            // 
+            this.dtpMeasurementDate.CalendarMonthBackground = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.dtpMeasurementDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
+            this.dtpMeasurementDate.Location = new System.Drawing.Point(170, 137);
+            this.dtpMeasurementDate.MinDate = System.DateTime.Today;
+            this.dtpMeasurementDate.Name = "dtpMeasurementDate";
+            this.dtpMeasurementDate.Size = new System.Drawing.Size(120, 22);
+            this.dtpMeasurementDate.TabIndex = 4;
+            this.dtpMeasurementDate.Value = System.DateTime.Today.AddDays(1);
+            // 
+            // lblTime
+            // 
+            this.lblTime.AutoSize = true;
+            this.lblTime.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblTime.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.lblTime.Location = new System.Drawing.Point(70, 180);
+            this.lblTime.Name = "lblTime";
+            this.lblTime.Size = new System.Drawing.Size(100, 20);
+            this.lblTime.TabIndex = 5;
+            this.lblTime.Text = "Время замера:";
+            // 
+            // dtpMeasurementTime
+            // 
+            this.dtpMeasurementTime.CustomFormat = "HH:mm";
+            this.dtpMeasurementTime.Format = System.Windows.Forms.DateTimePickerFormat.Time;
+            this.dtpMeasurementTime.Location = new System.Drawing.Point(170, 177);
+            this.dtpMeasurementTime.Name = "dtpMeasurementTime";
+            this.dtpMeasurementTime.ShowUpDown = true;
+            this.dtpMeasurementTime.Size = new System.Drawing.Size(120, 22);
+            this.dtpMeasurementTime.TabIndex = 6;
+            this.dtpMeasurementTime.Value = new System.DateTime(2024, 1, 1, 10, 0, 0);
+            // 
+            // btnSave
+            // 
+            this.btnSave.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnSave.FlatAppearance.BorderSize = 0;
+            this.btnSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnSave.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.btnSave.Location = new System.Drawing.Point(100, 240);
+            this.btnSave.Name = "btnSave";
+            this.btnSave.Size = new System.Drawing.Size(110, 40);
+            this.btnSave.TabIndex = 7;
+            this.btnSave.Text = "Создать";
+            this.btnSave.UseVisualStyleBackColor = false;
+            // 
+            // btnCancel
+            // 
+            this.btnCancel.BackColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancel.FlatAppearance.BorderSize = 0;
+            this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnCancel.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.btnCancel.Location = new System.Drawing.Point(230, 240);
+            this.btnCancel.Name = "btnCancel";
+            this.btnCancel.Size = new System.Drawing.Size(110, 40);
+            this.btnCancel.TabIndex = 8;
+            this.btnCancel.Text = "Отмена";
+            this.btnCancel.UseVisualStyleBackColor = false;
+            // 
+            // NewRequestForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            this.ClientSize = new System.Drawing.Size(450, 320);
+            this.Controls.Add(this.btnCancel);
+            this.Controls.Add(this.btnSave);
+            this.Controls.Add(this.dtpMeasurementTime);
+            this.Controls.Add(this.lblTime);
+            this.Controls.Add(this.dtpMeasurementDate);
+            this.Controls.Add(this.lblDate);
+            this.Controls.Add(this.cmbAddress);
+            this.Controls.Add(this.lblAddress);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.MaximizeBox = false;
+            this.Name = "NewRequestForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "Новая заявка";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+        }
+
+        private System.Windows.Forms.DateTimePicker dtpMeasurementDate;
+        private System.Windows.Forms.DateTimePicker dtpMeasurementTime;
+        private System.Windows.Forms.ComboBox cmbAddress;
+        private System.Windows.Forms.Button btnSave;
+        private System.Windows.Forms.Button btnCancel;
+        private System.Windows.Forms.Label lblAddress;
+        private System.Windows.Forms.Label lblDate;
+        private System.Windows.Forms.Label lblTime;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 108 - 0
NewRequestForm.cs

@@ -0,0 +1,108 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class NewRequestForm : Form
+    {
+        public NewRequestForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+            LoadAddresses();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnSave.Click += BtnSave_Click;
+            btnCancel.Click += BtnCancel_Click;
+        }
+
+        private void LoadAddresses()
+        {
+            try
+            {
+                // Проверяем, что клиент вошёл в систему
+                if (!Session.CurrentUser.ClientId.HasValue)
+                {
+                    MessageBox.Show("Ошибка: не удалось определить ID клиента",
+                        "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    btnSave.Enabled = false;
+                    return;
+                }
+
+                DataTable addresses = DatabaseHelper.GetClientAddresses(Session.CurrentUser.ClientId.Value);
+                cmbAddress.DisplayMember = "address_text";
+                cmbAddress.ValueMember = "address_id";
+                cmbAddress.DataSource = addresses;
+
+                if (cmbAddress.Items.Count == 0)
+                {
+                    MessageBox.Show("У вас нет сохранённых адресов. Добавьте адрес в личном кабинете.",
+                        "Внимание", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    btnSave.Enabled = false;
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка загрузки адресов: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnSave_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                // Проверка выбора адреса
+                if (cmbAddress.SelectedValue == null)
+                {
+                    MessageBox.Show("Выберите адрес", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                // Проверка даты и времени
+                DateTime measurementDateTime = dtpMeasurementDate.Value.Date + dtpMeasurementTime.Value.TimeOfDay;
+
+                if (measurementDateTime < DateTime.Now)
+                {
+                    MessageBox.Show("Дата и время замера не могут быть в прошлом", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                int newRequestId = DatabaseHelper.CreateRequest(
+                    Session.CurrentUser.ClientId.Value,
+                    measurementDateTime
+                );
+
+                if (newRequestId > 0)
+                {
+                    MessageBox.Show($"Заявка №{newRequestId} успешно создана!", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                    this.DialogResult = DialogResult.OK;
+                    this.Close();
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при создании заявки", "Ошибка",
+                        MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnCancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+            this.Close();
+        }
+    }
+}

+ 17 - 0
Program.cs

@@ -0,0 +1,17 @@
+using System;
+using System.Windows.Forms;
+
+namespace WindowsFormsApp4
+{
+    internal static class Program
+    {
+        [STAThread]
+        static void Main()
+        {
+
+            Application.EnableVisualStyles();
+            Application.SetCompatibleTextRenderingDefault(false);
+            Application.Run(new StartForm());
+        }
+    }
+}

+ 33 - 0
Properties/AssemblyInfo.cs

@@ -0,0 +1,33 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Общие сведения об этой сборке предоставляются следующим набором
+// набора атрибутов. Измените значения этих атрибутов для изменения сведений,
+// связанных со сборкой.
+[assembly: AssemblyTitle("WindowsFormsApp4")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("WindowsFormsApp4")]
+[assembly: AssemblyCopyright("Copyright ©  2025")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Установка значения False для параметра ComVisible делает типы в этой сборке невидимыми
+// для компонентов COM. Если необходимо обратиться к типу в этой сборке через
+// COM, следует установить атрибут ComVisible в TRUE для этого типа.
+[assembly: ComVisible(false)]
+
+// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
+[assembly: Guid("9da8271b-cc24-4a80-8548-6da0d76ea18e")]
+
+// Сведения о версии сборки состоят из указанных ниже четырех значений:
+//
+//      Основной номер версии
+//      Дополнительный номер версии
+//      Номер сборки
+//      Редакция
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     Этот код создан программным средством.
+//     Версия среды выполнения: 4.0.30319.42000
+//
+//     Изменения в этом файле могут привести к неправильному поведению и будут утрачены, если
+//     код создан повторно.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WindowsFormsApp4.Properties
+{
+
+
+    /// <summary>
+    ///   Класс ресурсов со строгим типом для поиска локализованных строк и пр.
+    /// </summary>
+    // Этот класс был автоматически создан при помощи StronglyTypedResourceBuilder
+    // класс с помощью таких средств, как ResGen или Visual Studio.
+    // Для добавления или удаления члена измените файл .ResX, а затем перезапустите ResGen
+    // с параметром /str или заново постройте свой VS-проект.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   Возврат кэшированного экземпляра ResourceManager, используемого этим классом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApp4.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   Переопределяет свойство CurrentUICulture текущего потока для всех
+        ///   подстановки ресурсов с помощью этого класса ресурсов со строгим типом.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace WindowsFormsApp4.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 317 - 0
RegisterForm.Designer.cs

@@ -0,0 +1,317 @@
+namespace WindowsFormsApp4
+{
+    partial class RegisterForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.txtLastName = new System.Windows.Forms.TextBox();
+            this.txtFirstName = new System.Windows.Forms.TextBox();
+            this.txtMiddleName = new System.Windows.Forms.TextBox();
+            this.txtPhone = new System.Windows.Forms.TextBox();
+            this.txtLogin = new System.Windows.Forms.TextBox();
+            this.txtPassword = new System.Windows.Forms.TextBox();
+            this.txtConfirmPassword = new System.Windows.Forms.TextBox();
+            this.btnRegister = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblLastName = new System.Windows.Forms.Label();
+            this.lblFirstName = new System.Windows.Forms.Label();
+            this.lblMiddleName = new System.Windows.Forms.Label();
+            this.lblPhone = new System.Windows.Forms.Label();
+            this.lblLogin = new System.Windows.Forms.Label();
+            this.lblPassword = new System.Windows.Forms.Label();
+            this.lblConfirmPassword = new System.Windows.Forms.Label();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // txtLastName
+            // 
+            this.txtLastName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtLastName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtLastName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtLastName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtLastName.Location = new System.Drawing.Point(98, 63);
+            this.txtLastName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtLastName.Name = "txtLastName";
+            this.txtLastName.Size = new System.Drawing.Size(150, 23);
+            this.txtLastName.TabIndex = 2;
+            // 
+            // txtFirstName
+            // 
+            this.txtFirstName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtFirstName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtFirstName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtFirstName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtFirstName.Location = new System.Drawing.Point(98, 91);
+            this.txtFirstName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtFirstName.Name = "txtFirstName";
+            this.txtFirstName.Size = new System.Drawing.Size(150, 23);
+            this.txtFirstName.TabIndex = 4;
+            // 
+            // txtMiddleName
+            // 
+            this.txtMiddleName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtMiddleName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtMiddleName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtMiddleName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtMiddleName.Location = new System.Drawing.Point(98, 119);
+            this.txtMiddleName.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtMiddleName.Name = "txtMiddleName";
+            this.txtMiddleName.Size = new System.Drawing.Size(150, 23);
+            this.txtMiddleName.TabIndex = 6;
+            // 
+            // txtPhone
+            // 
+            this.txtPhone.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtPhone.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtPhone.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtPhone.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtPhone.Location = new System.Drawing.Point(98, 148);
+            this.txtPhone.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtPhone.Name = "txtPhone";
+            this.txtPhone.Size = new System.Drawing.Size(150, 23);
+            this.txtPhone.TabIndex = 8;
+            // 
+            // txtLogin
+            // 
+            this.txtLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtLogin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtLogin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtLogin.Location = new System.Drawing.Point(98, 176);
+            this.txtLogin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtLogin.Name = "txtLogin";
+            this.txtLogin.Size = new System.Drawing.Size(150, 23);
+            this.txtLogin.TabIndex = 10;
+            // 
+            // txtPassword
+            // 
+            this.txtPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtPassword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtPassword.Location = new System.Drawing.Point(98, 205);
+            this.txtPassword.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtPassword.Name = "txtPassword";
+            this.txtPassword.Size = new System.Drawing.Size(150, 23);
+            this.txtPassword.TabIndex = 12;
+            this.txtPassword.UseSystemPasswordChar = true;
+            // 
+            // txtConfirmPassword
+            // 
+            this.txtConfirmPassword.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.txtConfirmPassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.txtConfirmPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.txtConfirmPassword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.txtConfirmPassword.Location = new System.Drawing.Point(98, 233);
+            this.txtConfirmPassword.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.txtConfirmPassword.Name = "txtConfirmPassword";
+            this.txtConfirmPassword.Size = new System.Drawing.Size(150, 23);
+            this.txtConfirmPassword.TabIndex = 14;
+            this.txtConfirmPassword.UseSystemPasswordChar = true;
+            // 
+            // btnRegister
+            // 
+            this.btnRegister.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnRegister.FlatAppearance.BorderSize = 0;
+            this.btnRegister.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRegister.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.btnRegister.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRegister.Location = new System.Drawing.Point(33, 276);
+            this.btnRegister.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnRegister.Name = "btnRegister";
+            this.btnRegister.Size = new System.Drawing.Size(151, 32);
+            this.btnRegister.TabIndex = 15;
+            this.btnRegister.Text = "Зарегистрировать";
+            this.btnRegister.UseVisualStyleBackColor = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.FlatAppearance.BorderSize = 0;
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.Location = new System.Drawing.Point(188, 276);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(98, 32);
+            this.btnBack.TabIndex = 16;
+            this.btnBack.Text = "Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblLastName
+            // 
+            this.lblLastName.AutoSize = true;
+            this.lblLastName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblLastName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblLastName.Location = new System.Drawing.Point(22, 65);
+            this.lblLastName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblLastName.Name = "lblLastName";
+            this.lblLastName.Size = new System.Drawing.Size(74, 17);
+            this.lblLastName.TabIndex = 1;
+            this.lblLastName.Text = "Фамилия:";
+            // 
+            // lblFirstName
+            // 
+            this.lblFirstName.AutoSize = true;
+            this.lblFirstName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblFirstName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblFirstName.Location = new System.Drawing.Point(45, 93);
+            this.lblFirstName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblFirstName.Name = "lblFirstName";
+            this.lblFirstName.Size = new System.Drawing.Size(39, 17);
+            this.lblFirstName.TabIndex = 3;
+            this.lblFirstName.Text = "Имя:";
+            // 
+            // lblMiddleName
+            // 
+            this.lblMiddleName.AutoSize = true;
+            this.lblMiddleName.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblMiddleName.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblMiddleName.Location = new System.Drawing.Point(30, 122);
+            this.lblMiddleName.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblMiddleName.Name = "lblMiddleName";
+            this.lblMiddleName.Size = new System.Drawing.Size(75, 17);
+            this.lblMiddleName.TabIndex = 5;
+            this.lblMiddleName.Text = "Отчество:";
+            // 
+            // lblPhone
+            // 
+            this.lblPhone.AutoSize = true;
+            this.lblPhone.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblPhone.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblPhone.Location = new System.Drawing.Point(38, 150);
+            this.lblPhone.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblPhone.Name = "lblPhone";
+            this.lblPhone.Size = new System.Drawing.Size(72, 17);
+            this.lblPhone.TabIndex = 7;
+            this.lblPhone.Text = "Телефон:";
+            // 
+            // lblLogin
+            // 
+            this.lblLogin.AutoSize = true;
+            this.lblLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblLogin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblLogin.Location = new System.Drawing.Point(45, 179);
+            this.lblLogin.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblLogin.Name = "lblLogin";
+            this.lblLogin.Size = new System.Drawing.Size(51, 17);
+            this.lblLogin.TabIndex = 9;
+            this.lblLogin.Text = "Логин:";
+            // 
+            // lblPassword
+            // 
+            this.lblPassword.AutoSize = true;
+            this.lblPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblPassword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblPassword.Location = new System.Drawing.Point(38, 207);
+            this.lblPassword.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblPassword.Name = "lblPassword";
+            this.lblPassword.Size = new System.Drawing.Size(61, 17);
+            this.lblPassword.TabIndex = 11;
+            this.lblPassword.Text = "Пароль:";
+            // 
+            // lblConfirmPassword
+            // 
+            this.lblConfirmPassword.AutoSize = true;
+            this.lblConfirmPassword.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblConfirmPassword.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblConfirmPassword.Location = new System.Drawing.Point(11, 236);
+            this.lblConfirmPassword.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblConfirmPassword.Name = "lblConfirmPassword";
+            this.lblConfirmPassword.Size = new System.Drawing.Size(117, 17);
+            this.lblConfirmPassword.TabIndex = 13;
+            this.lblConfirmPassword.Text = "Подтверждение:";
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(112, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(152, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Регистрация";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(360, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // RegisterForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(360, 333);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnRegister);
+            this.Controls.Add(this.txtConfirmPassword);
+            this.Controls.Add(this.lblConfirmPassword);
+            this.Controls.Add(this.txtPassword);
+            this.Controls.Add(this.lblPassword);
+            this.Controls.Add(this.txtLogin);
+            this.Controls.Add(this.lblLogin);
+            this.Controls.Add(this.txtPhone);
+            this.Controls.Add(this.lblPhone);
+            this.Controls.Add(this.txtMiddleName);
+            this.Controls.Add(this.lblMiddleName);
+            this.Controls.Add(this.txtFirstName);
+            this.Controls.Add(this.lblFirstName);
+            this.Controls.Add(this.txtLastName);
+            this.Controls.Add(this.lblLastName);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "RegisterForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Регистрация нового клиента";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        private System.Windows.Forms.TextBox txtLastName;
+        private System.Windows.Forms.TextBox txtFirstName;
+        private System.Windows.Forms.TextBox txtMiddleName;
+        private System.Windows.Forms.TextBox txtPhone;
+        private System.Windows.Forms.TextBox txtLogin;
+        private System.Windows.Forms.TextBox txtPassword;
+        private System.Windows.Forms.TextBox txtConfirmPassword;
+        private System.Windows.Forms.Button btnRegister;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblLastName;
+        private System.Windows.Forms.Label lblFirstName;
+        private System.Windows.Forms.Label lblMiddleName;
+        private System.Windows.Forms.Label lblPhone;
+        private System.Windows.Forms.Label lblLogin;
+        private System.Windows.Forms.Label lblPassword;
+        private System.Windows.Forms.Label lblConfirmPassword;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 178 - 0
RegisterForm.cs

@@ -0,0 +1,178 @@
+using System;
+using System.Text.RegularExpressions;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class RegisterForm : Form
+    {
+        public RegisterForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnRegister.Click += BtnRegister_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private bool ValidateFields()
+        {
+            if (string.IsNullOrWhiteSpace(txtLastName.Text))
+            {
+                MessageBox.Show("Введите фамилию", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtLastName.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtFirstName.Text))
+            {
+                MessageBox.Show("Введите имя", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtFirstName.Focus();
+                return false;
+            }
+
+            string phone = txtPhone.Text.Trim();
+            if (string.IsNullOrWhiteSpace(phone))
+            {
+                MessageBox.Show("Введите номер телефона", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return false;
+            }
+
+            Regex phoneRegex = new Regex(@"^(\+7|8)[0-9]{10}$");
+            if (!phoneRegex.IsMatch(phone))
+            {
+                MessageBox.Show("Некорректный номер телефона. Формат: +7XXXXXXXXXX или 8XXXXXXXXXX",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtLogin.Text))
+            {
+                MessageBox.Show("Введите логин", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtLogin.Focus();
+                return false;
+            }
+
+            if (txtLogin.Text.Length < 3)
+            {
+                MessageBox.Show("Логин должен содержать не менее 3 символов",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtLogin.Focus();
+                return false;
+            }
+
+            if (string.IsNullOrWhiteSpace(txtPassword.Text))
+            {
+                MessageBox.Show("Введите пароль", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPassword.Focus();
+                return false;
+            }
+
+            if (txtPassword.Text.Length < 6)
+            {
+                MessageBox.Show("Пароль должен содержать не менее 6 символов",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPassword.Focus();
+                return false;
+            }
+
+            if (txtPassword.Text != txtConfirmPassword.Text)
+            {
+                MessageBox.Show("Пароли не совпадают", "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtConfirmPassword.Focus();
+                return false;
+            }
+
+            return true;
+        }
+
+        private void BtnRegister_Click(object sender, EventArgs e)
+        {
+            if (!ValidateFields())
+                return;
+
+            if (DatabaseHelper.LoginExists(txtLogin.Text.Trim()))
+            {
+                MessageBox.Show("Пользователь с таким логином уже существует",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtLogin.Focus();
+                return;
+            }
+
+            if (DatabaseHelper.PhoneExists(txtPhone.Text.Trim()))
+            {
+                MessageBox.Show("Пользователь с таким номером телефона уже зарегистрирован",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                txtPhone.Focus();
+                return;
+            }
+
+            int newClientId = DatabaseHelper.RegisterClient(
+                txtLastName.Text.Trim(),
+                txtFirstName.Text.Trim(),
+                string.IsNullOrWhiteSpace(txtMiddleName.Text) ? null : txtMiddleName.Text.Trim(),
+                txtPhone.Text.Trim()
+            );
+
+            if (newClientId > 0)
+            {
+                int newUserId = DatabaseHelper.CreateUser(
+                    txtLastName.Text.Trim(),
+                    txtFirstName.Text.Trim(),
+                    string.IsNullOrWhiteSpace(txtMiddleName.Text) ? null : txtMiddleName.Text.Trim(),
+                    txtPhone.Text.Trim(),
+                    "client",
+                    newClientId,
+                    null
+                );
+
+                if (newUserId > 0)
+                {
+                    bool authCreated = DatabaseHelper.CreateUserAuth(
+                        newUserId,
+                        txtLogin.Text.Trim(),
+                        txtPassword.Text.Trim()
+                    );
+
+                    if (authCreated)
+                    {
+                        MessageBox.Show("Регистрация прошла успешно! Теперь вы можете войти в систему.",
+                            "Успешно", MessageBoxButtons.OK, MessageBoxIcon.Information);
+
+                        StartForm startForm = new StartForm();
+                        startForm.Show();
+                        this.Close();
+                    }
+                    else
+                    {
+                        MessageBox.Show("Ошибка при создании учётной записи",
+                            "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                    }
+                }
+                else
+                {
+                    MessageBox.Show("Ошибка при создании пользователя",
+                        "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                }
+            }
+            else
+            {
+                MessageBox.Show("Ошибка при регистрации клиента",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            StartForm startForm = new StartForm();
+            startForm.Show();
+            this.Close();
+        }
+    }
+}

+ 120 - 0
RegisterForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 335 - 0
ReportForm.Designer.cs

@@ -0,0 +1,335 @@
+namespace WindowsFormsApp4
+{
+    partial class ReportForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Legend legend2 = new System.Windows.Forms.DataVisualization.Charting.Legend();
+            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            this.dgvReport = new System.Windows.Forms.DataGridView();
+            this.btnStatistics = new System.Windows.Forms.Button();
+            this.btnPerformance = new System.Windows.Forms.Button();
+            this.btnExportExcel = new System.Windows.Forms.Button();
+            this.btnChart = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelFilter = new System.Windows.Forms.Panel();
+            this.dtpEndDate = new System.Windows.Forms.DateTimePicker();
+            this.dtpStartDate = new System.Windows.Forms.DateTimePicker();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.lblPeriod = new System.Windows.Forms.Label();
+            this.chartReport = new System.Windows.Forms.DataVisualization.Charting.Chart();
+            this.tabControl1 = new System.Windows.Forms.TabControl();
+            this.tabPageTable = new System.Windows.Forms.TabPage();
+            this.tabPageChart = new System.Windows.Forms.TabPage();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvReport)).BeginInit();
+            this.panelHeader.SuspendLayout();
+            this.panelFilter.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.chartReport)).BeginInit();
+            this.tabControl1.SuspendLayout();
+            this.tabPageTable.SuspendLayout();
+            this.tabPageChart.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // dgvReport
+            // 
+            this.dgvReport.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.dgvReport.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.dgvReport.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvReport.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.dgvReport.Location = new System.Drawing.Point(2, 2);
+            this.dgvReport.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.dgvReport.Name = "dgvReport";
+            this.dgvReport.ReadOnly = true;
+            this.dgvReport.RowHeadersVisible = false;
+            this.dgvReport.RowTemplate.Height = 30;
+            this.dgvReport.Size = new System.Drawing.Size(720, 279);
+            this.dgvReport.TabIndex = 0;
+            // 
+            // btnStatistics
+            // 
+            this.btnStatistics.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnStatistics.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnStatistics.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnStatistics.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnStatistics.Location = new System.Drawing.Point(9, 422);
+            this.btnStatistics.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnStatistics.Name = "btnStatistics";
+            this.btnStatistics.Size = new System.Drawing.Size(135, 32);
+            this.btnStatistics.TabIndex = 4;
+            this.btnStatistics.Text = "Статистика";
+            this.btnStatistics.UseVisualStyleBackColor = false;
+            // 
+            // btnPerformance
+            // 
+            this.btnPerformance.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnPerformance.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnPerformance.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnPerformance.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnPerformance.Location = new System.Drawing.Point(150, 422);
+            this.btnPerformance.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnPerformance.Name = "btnPerformance";
+            this.btnPerformance.Size = new System.Drawing.Size(165, 32);
+            this.btnPerformance.TabIndex = 3;
+            this.btnPerformance.Text = "Эффективность за период";
+            this.btnPerformance.UseVisualStyleBackColor = false;
+            // 
+            // btnExportExcel
+            // 
+            this.btnExportExcel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnExportExcel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnExportExcel.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnExportExcel.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnExportExcel.Location = new System.Drawing.Point(322, 422);
+            this.btnExportExcel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnExportExcel.Name = "btnExportExcel";
+            this.btnExportExcel.Size = new System.Drawing.Size(105, 32);
+            this.btnExportExcel.TabIndex = 2;
+            this.btnExportExcel.Text = "Экспорт";
+            this.btnExportExcel.UseVisualStyleBackColor = false;
+            // 
+            // btnChart
+            // 
+            this.btnChart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnChart.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnChart.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnChart.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnChart.Location = new System.Drawing.Point(435, 422);
+            this.btnChart.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnChart.Name = "btnChart";
+            this.btnChart.Size = new System.Drawing.Size(147, 32);
+            this.btnChart.TabIndex = 1;
+            this.btnChart.Text = "Показать график";
+            this.btnChart.UseVisualStyleBackColor = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.Location = new System.Drawing.Point(636, 422);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(105, 32);
+            this.btnBack.TabIndex = 0;
+            this.btnBack.Text = "< Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(322, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(95, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Отчёты";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(750, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // panelFilter
+            // 
+            this.panelFilter.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelFilter.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+            this.panelFilter.Controls.Add(this.dtpEndDate);
+            this.panelFilter.Controls.Add(this.dtpStartDate);
+            this.panelFilter.Controls.Add(this.label2);
+            this.panelFilter.Controls.Add(this.label1);
+            this.panelFilter.Controls.Add(this.lblPeriod);
+            this.panelFilter.Location = new System.Drawing.Point(9, 57);
+            this.panelFilter.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelFilter.Name = "panelFilter";
+            this.panelFilter.Size = new System.Drawing.Size(732, 41);
+            this.panelFilter.TabIndex = 1;
+            // 
+            // dtpEndDate
+            // 
+            this.dtpEndDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
+            this.dtpEndDate.Location = new System.Drawing.Point(300, 10);
+            this.dtpEndDate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.dtpEndDate.Name = "dtpEndDate";
+            this.dtpEndDate.Size = new System.Drawing.Size(91, 20);
+            this.dtpEndDate.TabIndex = 0;
+            this.dtpEndDate.Value = new System.DateTime(2026, 5, 31, 0, 0, 0, 0);
+            // 
+            // dtpStartDate
+            // 
+            this.dtpStartDate.Format = System.Windows.Forms.DateTimePickerFormat.Short;
+            this.dtpStartDate.Location = new System.Drawing.Point(169, 10);
+            this.dtpStartDate.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.dtpStartDate.Name = "dtpStartDate";
+            this.dtpStartDate.Size = new System.Drawing.Size(91, 20);
+            this.dtpStartDate.TabIndex = 1;
+            this.dtpStartDate.Value = new System.DateTime(2026, 5, 1, 0, 0, 0, 0);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.label2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.label2.Location = new System.Drawing.Point(270, 12);
+            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(30, 17);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "По:";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.label1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.label1.Location = new System.Drawing.Point(142, 12);
+            this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(21, 17);
+            this.label1.TabIndex = 3;
+            this.label1.Text = "С:";
+            // 
+            // lblPeriod
+            // 
+            this.lblPeriod.AutoSize = true;
+            this.lblPeriod.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.lblPeriod.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblPeriod.Location = new System.Drawing.Point(8, 12);
+            this.lblPeriod.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblPeriod.Name = "lblPeriod";
+            this.lblPeriod.Size = new System.Drawing.Size(158, 17);
+            this.lblPeriod.TabIndex = 4;
+            this.lblPeriod.Text = "Период для отчёта:";
+            // 
+            // chartReport
+            // 
+            chartArea2.Name = "ChartArea1";
+            this.chartReport.ChartAreas.Add(chartArea2);
+            this.chartReport.Dock = System.Windows.Forms.DockStyle.Fill;
+            legend2.Name = "Legend1";
+            this.chartReport.Legends.Add(legend2);
+            this.chartReport.Location = new System.Drawing.Point(2, 2);
+            this.chartReport.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.chartReport.Name = "chartReport";
+            series2.ChartArea = "ChartArea1";
+            series2.Legend = "Legend1";
+            series2.Name = "Series1";
+            this.chartReport.Series.Add(series2);
+            this.chartReport.Size = new System.Drawing.Size(720, 279);
+            this.chartReport.TabIndex = 0;
+            this.chartReport.Text = "chartReport";
+            // 
+            // tabControl1
+            // 
+            this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.tabControl1.Controls.Add(this.tabPageTable);
+            this.tabControl1.Controls.Add(this.tabPageChart);
+            this.tabControl1.Location = new System.Drawing.Point(9, 106);
+            this.tabControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabControl1.Name = "tabControl1";
+            this.tabControl1.SelectedIndex = 0;
+            this.tabControl1.Size = new System.Drawing.Size(732, 309);
+            this.tabControl1.TabIndex = 2;
+            // 
+            // tabPageTable
+            // 
+            this.tabPageTable.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.tabPageTable.Controls.Add(this.dgvReport);
+            this.tabPageTable.Location = new System.Drawing.Point(4, 22);
+            this.tabPageTable.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabPageTable.Name = "tabPageTable";
+            this.tabPageTable.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabPageTable.Size = new System.Drawing.Size(724, 283);
+            this.tabPageTable.TabIndex = 0;
+            this.tabPageTable.Text = "Таблица";
+            // 
+            // tabPageChart
+            // 
+            this.tabPageChart.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.tabPageChart.Controls.Add(this.chartReport);
+            this.tabPageChart.Location = new System.Drawing.Point(4, 22);
+            this.tabPageChart.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabPageChart.Name = "tabPageChart";
+            this.tabPageChart.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabPageChart.Size = new System.Drawing.Size(724, 283);
+            this.tabPageChart.TabIndex = 1;
+            this.tabPageChart.Text = "График";
+            // 
+            // ReportForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(750, 471);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnChart);
+            this.Controls.Add(this.btnExportExcel);
+            this.Controls.Add(this.btnPerformance);
+            this.Controls.Add(this.btnStatistics);
+            this.Controls.Add(this.tabControl1);
+            this.Controls.Add(this.panelFilter);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "ReportForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Отчёты - Обработка заявок";
+            ((System.ComponentModel.ISupportInitialize)(this.dgvReport)).EndInit();
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.panelFilter.ResumeLayout(false);
+            this.panelFilter.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.chartReport)).EndInit();
+            this.tabControl1.ResumeLayout(false);
+            this.tabPageTable.ResumeLayout(false);
+            this.tabPageChart.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        private System.Windows.Forms.DataGridView dgvReport;
+        private System.Windows.Forms.Button btnStatistics;
+        private System.Windows.Forms.Button btnPerformance;
+        private System.Windows.Forms.Button btnExportExcel;
+        private System.Windows.Forms.Button btnChart;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+        private System.Windows.Forms.Panel panelFilter;
+        private System.Windows.Forms.DateTimePicker dtpEndDate;
+        private System.Windows.Forms.DateTimePicker dtpStartDate;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label lblPeriod;
+        private System.Windows.Forms.TabControl tabControl1;
+        private System.Windows.Forms.TabPage tabPageTable;
+        private System.Windows.Forms.TabPage tabPageChart;
+        private System.Windows.Forms.DataVisualization.Charting.Chart chartReport;
+    }
+}

+ 227 - 0
ReportForm.cs

@@ -0,0 +1,227 @@
+using System;
+using System.Data;
+using System.IO;
+using System.Windows.Forms;
+using System.Windows.Forms.DataVisualization.Charting;
+using OfficeOpenXml;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class ReportForm : Form
+    {
+        private DataTable currentDataTable;
+        private string currentReportType = "";
+
+        public ReportForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+            ConfigureChart();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnStatistics.Click += BtnStatistics_Click;
+            btnPerformance.Click += BtnPerformance_Click;
+            btnExportExcel.Click += BtnExportExcel_Click;
+            btnChart.Click += BtnChart_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private void ConfigureChart()
+        {
+            chartReport.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            chartReport.ChartAreas[0].BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            chartReport.ChartAreas[0].AxisX.LabelStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            chartReport.ChartAreas[0].AxisY.LabelStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            chartReport.ChartAreas[0].AxisX.MajorGrid.LineColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            chartReport.ChartAreas[0].AxisY.MajorGrid.LineColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            chartReport.Legends[0].ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+        }
+
+        private void ConfigureGrid()
+        {
+            if (dgvReport.Columns.Count == 0) return;
+
+            dgvReport.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvReport.DefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            dgvReport.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvReport.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvReport.ColumnHeadersDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvReport.ColumnHeadersDefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvReport.EnableHeadersVisualStyles = false;
+            dgvReport.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
+        }
+
+        private void BtnStatistics_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                currentDataTable = DatabaseHelper.GetManagerStatistics();
+                dgvReport.DataSource = currentDataTable;
+                ConfigureGrid();
+                currentReportType = "statistics";
+
+                tabControl1.SelectedTab = tabPageTable;
+                MessageBox.Show($"Загружено {currentDataTable.Rows.Count} записей", "Информация",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnPerformance_Click(object sender, EventArgs e)
+        {
+            try
+            {
+                DateTime startDate = dtpStartDate.Value;
+                DateTime endDate = dtpEndDate.Value;
+
+                if (startDate > endDate)
+                {
+                    MessageBox.Show("Начальная дата не может быть позже конечной",
+                        "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                    return;
+                }
+
+                currentDataTable = DatabaseHelper.GetManagerPerformance(startDate, endDate);
+                dgvReport.DataSource = currentDataTable;
+                ConfigureGrid();
+                currentReportType = "performance";
+
+                tabControl1.SelectedTab = tabPageTable;
+                MessageBox.Show($"Отчёт за период {startDate:dd.MM.yyyy} - {endDate:dd.MM.yyyy}\nЗагружено {currentDataTable.Rows.Count} записей",
+                    "Информация", MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnChart_Click(object sender, EventArgs e)
+        {
+            if (currentDataTable == null || currentDataTable.Rows.Count == 0)
+            {
+                MessageBox.Show("Сначала загрузите данные (Статистика или Эффективность)",
+                    "Нет данных", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            DrawChart();
+            tabControl1.SelectedTab = tabPageChart;
+        }
+
+        private void DrawChart()
+        {
+            chartReport.Series.Clear();
+
+            Series series = new Series();
+            series.ChartType = SeriesChartType.Column;
+            series.Color = System.Drawing.Color.FromArgb(198, 141, 255);
+            series.BorderWidth = 2;
+            series.ShadowOffset = 2;
+
+            if (currentReportType == "statistics")
+            {
+                series.Name = "Выполненные заявки";
+
+                foreach (DataRow row in currentDataTable.Rows)
+                {
+                    string managerName = $"{row["last_name"]} {row["first_name"]}";
+                    int completed = Convert.ToInt32(row["completed_requests"]);
+                    series.Points.AddXY(managerName, completed);
+                }
+                chartReport.Titles.Clear();
+                chartReport.Titles.Add("Статистика выполнения заявок по менеджерам");
+            }
+            else if (currentReportType == "performance")
+            {
+                series.Name = "Выполнено заявок";
+
+                foreach (DataRow row in currentDataTable.Rows)
+                {
+                    string managerName = $"{row["last_name"]} {row["first_name"]}";
+                    int completed = Convert.ToInt32(row["completed_count"]);
+                    series.Points.AddXY(managerName, completed);
+                }
+                chartReport.Titles.Clear();
+                chartReport.Titles.Add($"Эффективность менеджеров за период");
+            }
+
+            chartReport.Series.Add(series);
+
+            // Настройка внешнего вида графика
+            chartReport.ChartAreas[0].AxisX.LabelStyle.Angle = -45;
+            chartReport.ChartAreas[0].AxisX.Interval = 1;
+            chartReport.ChartAreas[0].AxisX.Title = "Менеджеры";
+            chartReport.ChartAreas[0].AxisY.Title = "Количество заявок";
+            chartReport.ChartAreas[0].AxisX.TitleForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            chartReport.ChartAreas[0].AxisY.TitleForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+        }
+
+        private void BtnExportExcel_Click(object sender, EventArgs e)
+        {
+            if (currentDataTable == null || currentDataTable.Rows.Count == 0)
+            {
+                MessageBox.Show("Нет данных для экспорта", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            try
+            {
+                SaveFileDialog saveDialog = new SaveFileDialog();
+                saveDialog.Filter = "Excel files (*.xlsx)|*.xlsx";
+                saveDialog.FileName = $"Отчёт_{DateTime.Now:yyyyMMdd_HHmmss}.xlsx";
+
+                if (saveDialog.ShowDialog() == DialogResult.OK)
+                {
+                    using (var package = new ExcelPackage())
+                    {
+                        var worksheet = package.Workbook.Worksheets.Add("Отчёт");
+
+                        // Заголовки
+                        for (int i = 0; i < dgvReport.Columns.Count; i++)
+                        {
+                            worksheet.Cells[1, i + 1].Value = dgvReport.Columns[i].HeaderText;
+                            worksheet.Cells[1, i + 1].Style.Font.Bold = true;
+                            worksheet.Cells[1, i + 1].Style.Fill.PatternType = OfficeOpenXml.Style.ExcelFillStyle.Solid;
+                            worksheet.Cells[1, i + 1].Style.Fill.BackgroundColor.SetColor(System.Drawing.Color.FromArgb(198, 141, 255));
+                        }
+
+                        // Данные
+                        for (int i = 0; i < dgvReport.Rows.Count; i++)
+                        {
+                            for (int j = 0; j < dgvReport.Columns.Count; j++)
+                            {
+                                worksheet.Cells[i + 2, j + 1].Value = dgvReport.Rows[i].Cells[j].Value?.ToString();
+                            }
+                        }
+
+                        worksheet.Cells.AutoFitColumns();
+                        package.SaveAs(new FileInfo(saveDialog.FileName));
+                    }
+
+                    MessageBox.Show("Отчёт успешно сохранён!", "Успешно",
+                        MessageBoxButtons.OK, MessageBoxIcon.Information);
+                }
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка при экспорте: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 120 - 0
ReportForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 216 - 0
RequestsForm.Designer.cs

@@ -0,0 +1,216 @@
+namespace WindowsFormsApp4
+{
+    partial class RequestsForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.dgvRequests = new System.Windows.Forms.DataGridView();
+            this.btnRefresh = new System.Windows.Forms.Button();
+            this.btnChangeStatus = new System.Windows.Forms.Button();
+            this.btnNewRequest = new System.Windows.Forms.Button();
+            this.btnCancelRequest = new System.Windows.Forms.Button();
+            this.btnTakeToWork = new System.Windows.Forms.Button();
+            this.btnAssignManager = new System.Windows.Forms.Button();
+            this.btnBack = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            ((System.ComponentModel.ISupportInitialize)(this.dgvRequests)).BeginInit();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // dgvRequests
+            // 
+            this.dgvRequests.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
+            | System.Windows.Forms.AnchorStyles.Left) 
+            | System.Windows.Forms.AnchorStyles.Right)));
+            this.dgvRequests.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.dgvRequests.BorderStyle = System.Windows.Forms.BorderStyle.None;
+            this.dgvRequests.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
+            this.dgvRequests.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.dgvRequests.Location = new System.Drawing.Point(15, 65);
+            this.dgvRequests.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.dgvRequests.Name = "dgvRequests";
+            this.dgvRequests.ReadOnly = true;
+            this.dgvRequests.RowHeadersVisible = false;
+            this.dgvRequests.RowTemplate.Height = 30;
+            this.dgvRequests.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
+            this.dgvRequests.Size = new System.Drawing.Size(645, 325);
+            this.dgvRequests.TabIndex = 1;
+            // 
+            // btnRefresh
+            // 
+            this.btnRefresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnRefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRefresh.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.btnRefresh.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRefresh.Location = new System.Drawing.Point(15, 406);
+            this.btnRefresh.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnRefresh.Name = "btnRefresh";
+            this.btnRefresh.Size = new System.Drawing.Size(75, 32);
+            this.btnRefresh.TabIndex = 6;
+            this.btnRefresh.Text = "Обновить";
+            this.btnRefresh.UseVisualStyleBackColor = false;
+            // 
+            // btnChangeStatus
+            // 
+            this.btnChangeStatus.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnChangeStatus.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnChangeStatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnChangeStatus.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnChangeStatus.Location = new System.Drawing.Point(98, 406);
+            this.btnChangeStatus.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnChangeStatus.Name = "btnChangeStatus";
+            this.btnChangeStatus.Size = new System.Drawing.Size(98, 32);
+            this.btnChangeStatus.TabIndex = 5;
+            this.btnChangeStatus.Text = "✏️ Изменить статус";
+            this.btnChangeStatus.UseVisualStyleBackColor = false;
+            this.btnChangeStatus.Visible = false;
+            // 
+            // btnNewRequest
+            // 
+            this.btnNewRequest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnNewRequest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnNewRequest.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.btnNewRequest.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnNewRequest.Location = new System.Drawing.Point(98, 406);
+            this.btnNewRequest.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnNewRequest.Name = "btnNewRequest";
+            this.btnNewRequest.Size = new System.Drawing.Size(100, 32);
+            this.btnNewRequest.TabIndex = 4;
+            this.btnNewRequest.Text = "Новая заявка";
+            this.btnNewRequest.UseVisualStyleBackColor = false;
+            this.btnNewRequest.Visible = false;
+            // 
+            // btnCancelRequest
+            // 
+            this.btnCancelRequest.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnCancelRequest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnCancelRequest.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnCancelRequest.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnCancelRequest.Location = new System.Drawing.Point(202, 406);
+            this.btnCancelRequest.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnCancelRequest.Name = "btnCancelRequest";
+            this.btnCancelRequest.Size = new System.Drawing.Size(58, 32);
+            this.btnCancelRequest.TabIndex = 3;
+            this.btnCancelRequest.Text = "🗑️";
+            this.btnCancelRequest.UseVisualStyleBackColor = false;
+            this.btnCancelRequest.Visible = false;
+            // 
+            // btnTakeToWork
+            // 
+            this.btnTakeToWork.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnTakeToWork.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnTakeToWork.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.btnTakeToWork.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnTakeToWork.Location = new System.Drawing.Point(264, 406);
+            this.btnTakeToWork.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnTakeToWork.Name = "btnTakeToWork";
+            this.btnTakeToWork.Size = new System.Drawing.Size(112, 32);
+            this.btnTakeToWork.TabIndex = 2;
+            this.btnTakeToWork.Text = "Взять в работу";
+            this.btnTakeToWork.UseVisualStyleBackColor = false;
+            this.btnTakeToWork.Visible = false;
+            // 
+            // btnAssignManager
+            // 
+            this.btnAssignManager.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnAssignManager.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnAssignManager.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
+            this.btnAssignManager.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnAssignManager.Location = new System.Drawing.Point(380, 406);
+            this.btnAssignManager.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnAssignManager.Name = "btnAssignManager";
+            this.btnAssignManager.Size = new System.Drawing.Size(154, 32);
+            this.btnAssignManager.TabIndex = 1;
+            this.btnAssignManager.Text = "Назначить менеджера";
+            this.btnAssignManager.UseVisualStyleBackColor = false;
+            this.btnAssignManager.Visible = false;
+            // 
+            // btnBack
+            // 
+            this.btnBack.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnBack.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Bold);
+            this.btnBack.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnBack.Location = new System.Drawing.Point(570, 406);
+            this.btnBack.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnBack.Name = "btnBack";
+            this.btnBack.Size = new System.Drawing.Size(90, 32);
+            this.btnBack.TabIndex = 0;
+            this.btnBack.Text = "< Назад";
+            this.btnBack.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(285, 12);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(91, 26);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Заявки";
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(675, 49);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // RequestsForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(675, 455);
+            this.Controls.Add(this.btnBack);
+            this.Controls.Add(this.btnAssignManager);
+            this.Controls.Add(this.btnTakeToWork);
+            this.Controls.Add(this.btnCancelRequest);
+            this.Controls.Add(this.btnNewRequest);
+            this.Controls.Add(this.btnChangeStatus);
+            this.Controls.Add(this.btnRefresh);
+            this.Controls.Add(this.dgvRequests);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "RequestsForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Заявки - Обработка заявок";
+            ((System.ComponentModel.ISupportInitialize)(this.dgvRequests)).EndInit();
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        private System.Windows.Forms.DataGridView dgvRequests;
+        private System.Windows.Forms.Button btnRefresh;
+        private System.Windows.Forms.Button btnChangeStatus;
+        private System.Windows.Forms.Button btnNewRequest;
+        private System.Windows.Forms.Button btnCancelRequest;
+        private System.Windows.Forms.Button btnTakeToWork;
+        private System.Windows.Forms.Button btnAssignManager;
+        private System.Windows.Forms.Button btnBack;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 261 - 0
RequestsForm.cs

@@ -0,0 +1,261 @@
+using System;
+using System.Data;
+using System.Windows.Forms;
+
+
+namespace WindowsFormsApp4
+{
+    public partial class RequestsForm : Form
+    {
+        private DataTable requestsTable;
+
+        public RequestsForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+            LoadRequests();
+            ConfigureGrid();
+            ConfigureButtonsByRole();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnRefresh.Click += BtnRefresh_Click;
+            btnChangeStatus.Click += BtnChangeStatus_Click;
+            btnNewRequest.Click += BtnNewRequest_Click;
+            btnCancelRequest.Click += BtnCancelRequest_Click;
+            btnTakeToWork.Click += BtnTakeToWork_Click;
+            btnAssignManager.Click += BtnAssignManager_Click;
+            btnBack.Click += BtnBack_Click;
+        }
+
+        private void ConfigureButtonsByRole()
+        {
+            btnChangeStatus.Visible = false;
+            btnNewRequest.Visible = false;
+            btnCancelRequest.Visible = false;
+            btnTakeToWork.Visible = false;
+            btnAssignManager.Visible = false;
+
+            if (Session.IsClient)
+            {
+                btnNewRequest.Visible = true;
+                btnCancelRequest.Visible = true;
+                lblTitle.Text = "📋 Мои заявки";
+                Console.WriteLine("Клиент: показаны кнопки Новая заявка и Отменить");
+            }
+            else if (Session.IsManager)
+            {
+                btnChangeStatus.Visible = true;
+                btnTakeToWork.Visible = true;
+                lblTitle.Text = "📋 Заявки (назначенные мне)";
+                Console.WriteLine("Менеджер: показаны кнопки Изменить статус и Взять в работу");
+            }
+            else if (Session.IsAdmin)
+            {
+                btnChangeStatus.Visible = true;
+                btnAssignManager.Visible = true;
+                lblTitle.Text = "📋 Все заявки";
+                Console.WriteLine("Админ: показаны кнопки Изменить статус и Назначить менеджера");
+            }
+        }
+
+        private void LoadRequests()
+        {
+            try
+            {
+                requestsTable = DatabaseHelper.GetRequests(
+                    Session.CurrentUser.UserId,
+                    Session.CurrentUser.Role,
+                    Session.CurrentUser.ClientId,
+                    Session.CurrentUser.ManagerId
+                );
+
+                MessageBox.Show($"Таблица загружена. Строк: {requestsTable.Rows.Count}", "Отладка");
+
+                dgvRequests.DataSource = requestsTable;
+                ConfigureGrid();
+
+                dgvRequests.Visible = true;
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"Ошибка загрузки заявок: {ex.Message}", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Error);
+            }
+        }
+
+        private void ConfigureGrid()
+        {
+            if (dgvRequests.Columns.Count == 0) return;
+
+            if (dgvRequests.Columns.Contains("id"))
+                dgvRequests.Columns["id"].HeaderText = "№";
+
+            if (dgvRequests.Columns.Contains("client_name"))
+                dgvRequests.Columns["client_name"].HeaderText = "Клиент";
+
+            if (dgvRequests.Columns.Contains("manager_name"))
+                dgvRequests.Columns["manager_name"].HeaderText = "Менеджер";
+
+            if (dgvRequests.Columns.Contains("request_date"))
+                dgvRequests.Columns["request_date"].HeaderText = "Дата заявки";
+
+            if (dgvRequests.Columns.Contains("measurement_datetime"))
+                dgvRequests.Columns["measurement_datetime"].HeaderText = "Дата замера";
+
+            if (dgvRequests.Columns.Contains("status"))
+                dgvRequests.Columns["status"].HeaderText = "Статус";
+
+            // Настройка цветов
+            dgvRequests.DefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvRequests.DefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(203, 232, 87);
+            dgvRequests.DefaultCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvRequests.DefaultCellStyle.SelectionForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvRequests.ColumnHeadersDefaultCellStyle.BackColor = System.Drawing.Color.FromArgb(198, 141, 255);
+            dgvRequests.ColumnHeadersDefaultCellStyle.ForeColor = System.Drawing.Color.FromArgb(50, 56, 67);
+            dgvRequests.EnableHeadersVisualStyles = false;
+
+            if (Session.IsClient)
+            {
+                if (dgvRequests.Columns.Contains("client_name"))
+                    dgvRequests.Columns["client_name"].Visible = false;
+                if (dgvRequests.Columns.Contains("manager_name"))
+                    dgvRequests.Columns["manager_name"].Visible = false;
+            }
+
+            dgvRequests.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
+        }
+
+        private void BtnRefresh_Click(object sender, EventArgs e)
+        {
+            LoadRequests();
+        }
+
+        private void BtnChangeStatus_Click(object sender, EventArgs e)
+        {
+            if (dgvRequests.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите заявку", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int requestId = Convert.ToInt32(dgvRequests.CurrentRow.Cells["id"].Value);
+            string currentStatus = dgvRequests.CurrentRow.Cells["status"].Value.ToString();
+
+            ChangeStatusForm form = new ChangeStatusForm(requestId, currentStatus);
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadRequests();
+            }
+        }
+
+        private void BtnNewRequest_Click(object sender, EventArgs e)
+        {
+            NewRequestForm form = new NewRequestForm();
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadRequests();
+                MessageBox.Show("Заявка успешно создана!", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnCancelRequest_Click(object sender, EventArgs e)
+        {
+            if (dgvRequests.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите заявку", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int requestId = Convert.ToInt32(dgvRequests.CurrentRow.Cells["id"].Value);
+            string currentStatus = dgvRequests.CurrentRow.Cells["status"].Value.ToString();
+
+            if (currentStatus != "new")
+            {
+                MessageBox.Show("Можно отменить только заявку со статусом 'Новая'",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            DialogResult result = MessageBox.Show("Отменить заявку?",
+                "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+
+            if (result == DialogResult.Yes)
+            {
+                DatabaseHelper.UpdateRequestStatus(requestId, "cancelled");
+                LoadRequests();
+                MessageBox.Show("Заявка отменена", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnTakeToWork_Click(object sender, EventArgs e)
+        {
+            if (dgvRequests.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите заявку", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int requestId = Convert.ToInt32(dgvRequests.CurrentRow.Cells["id"].Value);
+            string currentStatus = dgvRequests.CurrentRow.Cells["status"].Value.ToString();
+
+            if (currentStatus != "new")
+            {
+                MessageBox.Show("Можно взять в работу только заявку со статусом 'Новая'",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            DialogResult result = MessageBox.Show("Взять заявку в работу?",
+                "Подтверждение", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
+
+            if (result == DialogResult.Yes)
+            {
+                DatabaseHelper.AssignManagerToRequest(requestId, Session.CurrentUser.ManagerId.Value);
+                DatabaseHelper.UpdateRequestStatus(requestId, "in_progress");
+                LoadRequests();
+                MessageBox.Show("Заявка взята в работу", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnAssignManager_Click(object sender, EventArgs e)
+        {
+            if (dgvRequests.CurrentRow == null)
+            {
+                MessageBox.Show("Выберите заявку", "Ошибка",
+                    MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            int requestId = Convert.ToInt32(dgvRequests.CurrentRow.Cells["id"].Value);
+            string currentStatus = dgvRequests.CurrentRow.Cells["status"].Value.ToString();
+
+            if (currentStatus != "new")
+            {
+                MessageBox.Show("Можно назначить менеджера только на заявку со статусом 'Новая'",
+                    "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+                return;
+            }
+
+            AssignManagerForm form = new AssignManagerForm(requestId);
+            if (form.ShowDialog() == DialogResult.OK)
+            {
+                LoadRequests();
+                MessageBox.Show("Менеджер назначен", "Успешно",
+                    MessageBoxButtons.OK, MessageBoxIcon.Information);
+            }
+        }
+
+        private void BtnBack_Click(object sender, EventArgs e)
+        {
+            this.Close();
+        }
+    }
+}

+ 120 - 0
RequestsForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 26 - 0
Session.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace WindowsFormsApp4
+{
+    public static class Session
+    {
+        public static DatabaseHelper.User CurrentUser { get; set; }
+
+        public static bool IsLoggedIn => CurrentUser != null;
+
+        public static bool IsAdmin => CurrentUser?.Role == "admin";
+
+        public static bool IsManager => CurrentUser?.Role == "manager";
+
+        public static bool IsClient => CurrentUser?.Role == "client";
+
+        public static void Logout()
+        {
+            CurrentUser = null;
+        }
+    }
+}

+ 121 - 0
StartForm.Designer.cs

@@ -0,0 +1,121 @@
+namespace WindowsFormsApp4
+{
+    partial class StartForm
+    {
+        private System.ComponentModel.IContainer components = null;
+
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        private void InitializeComponent()
+        {
+            this.btnLogin = new System.Windows.Forms.Button();
+            this.btnRegister = new System.Windows.Forms.Button();
+            this.lblTitle = new System.Windows.Forms.Label();
+            this.lblSubtitle = new System.Windows.Forms.Label();
+            this.panelHeader = new System.Windows.Forms.Panel();
+            this.panelHeader.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // btnLogin
+            // 
+            this.btnLogin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(198)))), ((int)(((byte)(141)))), ((int)(((byte)(255)))));
+            this.btnLogin.FlatAppearance.BorderSize = 0;
+            this.btnLogin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnLogin.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnLogin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnLogin.Location = new System.Drawing.Point(75, 114);
+            this.btnLogin.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnLogin.Name = "btnLogin";
+            this.btnLogin.Size = new System.Drawing.Size(225, 41);
+            this.btnLogin.TabIndex = 1;
+            this.btnLogin.Text = "Вход в систему";
+            this.btnLogin.UseVisualStyleBackColor = false;
+            // 
+            // btnRegister
+            // 
+            this.btnRegister.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.btnRegister.FlatAppearance.BorderSize = 0;
+            this.btnRegister.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.btnRegister.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold);
+            this.btnRegister.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.btnRegister.Location = new System.Drawing.Point(75, 171);
+            this.btnRegister.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnRegister.Name = "btnRegister";
+            this.btnRegister.Size = new System.Drawing.Size(225, 41);
+            this.btnRegister.TabIndex = 2;
+            this.btnRegister.Text = "Регистрация";
+            this.btnRegister.UseVisualStyleBackColor = false;
+            // 
+            // lblTitle
+            // 
+            this.lblTitle.AutoSize = true;
+            this.lblTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F, System.Drawing.FontStyle.Bold);
+            this.lblTitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblTitle.Location = new System.Drawing.Point(54, 9);
+            this.lblTitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblTitle.Name = "lblTitle";
+            this.lblTitle.Size = new System.Drawing.Size(261, 31);
+            this.lblTitle.TabIndex = 0;
+            this.lblTitle.Text = "Обработка заявок";
+            this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // lblSubtitle
+            // 
+            this.lblSubtitle.AutoSize = true;
+            this.lblSubtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F);
+            this.lblSubtitle.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(203)))), ((int)(((byte)(232)))), ((int)(((byte)(87)))));
+            this.lblSubtitle.Location = new System.Drawing.Point(72, 51);
+            this.lblSubtitle.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.lblSubtitle.Name = "lblSubtitle";
+            this.lblSubtitle.Size = new System.Drawing.Size(212, 17);
+            this.lblSubtitle.TabIndex = 1;
+            this.lblSubtitle.Text = "Система управления заявками";
+            this.lblSubtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+            // 
+            // panelHeader
+            // 
+            this.panelHeader.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.panelHeader.Controls.Add(this.lblTitle);
+            this.panelHeader.Controls.Add(this.lblSubtitle);
+            this.panelHeader.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelHeader.Location = new System.Drawing.Point(0, 0);
+            this.panelHeader.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.panelHeader.Name = "panelHeader";
+            this.panelHeader.Size = new System.Drawing.Size(375, 81);
+            this.panelHeader.TabIndex = 0;
+            // 
+            // StartForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(56)))), ((int)(((byte)(67)))));
+            this.ClientSize = new System.Drawing.Size(375, 260);
+            this.Controls.Add(this.btnRegister);
+            this.Controls.Add(this.btnLogin);
+            this.Controls.Add(this.panelHeader);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.MaximizeBox = false;
+            this.Name = "StartForm";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+            this.Text = "Обработка заявок - Добро пожаловать";
+            this.panelHeader.ResumeLayout(false);
+            this.panelHeader.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        private System.Windows.Forms.Button btnLogin;
+        private System.Windows.Forms.Button btnRegister;
+        private System.Windows.Forms.Label lblTitle;
+        private System.Windows.Forms.Label lblSubtitle;
+        private System.Windows.Forms.Panel panelHeader;
+    }
+}

+ 43 - 0
StartForm.cs

@@ -0,0 +1,43 @@
+using System;
+using System.Windows.Forms;
+
+namespace WindowsFormsApp4
+{
+    public partial class StartForm : Form
+    {
+        public StartForm()
+        {
+            InitializeComponent();
+            AttachEventHandlers();
+        }
+
+        private void AttachEventHandlers()
+        {
+            btnLogin.Click += BtnLogin_Click;
+            btnRegister.Click += BtnRegister_Click;
+        }
+
+        private void BtnLogin_Click(object sender, EventArgs e)
+        {
+            LoginForm loginForm = new LoginForm();
+            loginForm.Show();
+            this.Hide();
+        }
+
+        private void BtnRegister_Click(object sender, EventArgs e)
+        {
+            RegisterForm registerForm = new RegisterForm();
+            registerForm.Show();
+            this.Hide();
+        }
+
+        protected override void OnFormClosing(FormClosingEventArgs e)
+        {
+            base.OnFormClosing(e);
+            if (e.CloseReason == CloseReason.UserClosing)
+            {
+                Application.Exit();
+            }
+        }
+    }
+}

+ 120 - 0
StartForm.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 311 - 0
WindowsFormsApp4.csproj

@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{9DA8271B-CC24-4A80-8548-6DA0D76EA18E}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>WindowsFormsApp4</RootNamespace>
+    <AssemblyName>WindowsFormsApp4</AssemblyName>
+    <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+    <NuGetPackageImportStamp>
+    </NuGetPackageImportStamp>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="DocumentFormat.OpenXml.Framework, Version=3.3.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
+      <HintPath>packages\DocumentFormat.OpenXml.Framework.3.3.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
+    </Reference>
+    <Reference Include="EPPlus, Version=4.5.3.3, Culture=neutral, PublicKeyToken=ea159fdaa78159a1, processorArchitecture=MSIL">
+      <HintPath>packages\EPPlus.4.5.3.3\lib\net40\EPPlus.dll</HintPath>
+    </Reference>
+    <Reference Include="EPPlus.Interfaces, Version=8.4.0.0, Culture=neutral, PublicKeyToken=a694d7f3b0907a61, processorArchitecture=MSIL">
+      <HintPath>packages\EPPlus.Interfaces.8.4.0\lib\net462\EPPlus.Interfaces.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Bcl.HashCode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.Extensions.Logging.Abstractions.8.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.IO.RecyclableMemoryStream, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+      <HintPath>packages\Microsoft.IO.RecyclableMemoryStream.3.0.1\lib\netstandard2.0\Microsoft.IO.RecyclableMemoryStream.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.VisualBasic" />
+    <Reference Include="Npgsql, Version=8.0.8.0, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7, processorArchitecture=MSIL">
+      <HintPath>packages\Npgsql.8.0.8\lib\netstandard2.0\Npgsql.dll</HintPath>
+    </Reference>
+    <Reference Include="PresentationCore" />
+    <Reference Include="Raven.Abstractions, Version=3.5.9.0, Culture=neutral, PublicKeyToken=37f41c7f99471593, processorArchitecture=MSIL">
+      <HintPath>packages\RavenDB.Database.3.5.9\lib\net45\Raven.Abstractions.dll</HintPath>
+    </Reference>
+    <Reference Include="Raven.Client.Lightweight, Version=3.5.9.0, Culture=neutral, PublicKeyToken=37f41c7f99471593, processorArchitecture=MSIL">
+      <HintPath>packages\RavenDB.Client.3.5.9\lib\net45\Raven.Client.Lightweight.dll</HintPath>
+    </Reference>
+    <Reference Include="Raven.Database, Version=3.5.9.0, Culture=neutral, PublicKeyToken=37f41c7f99471593, processorArchitecture=MSIL">
+      <HintPath>packages\RavenDB.Database.3.5.9\lib\net45\Raven.Database.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Collections.Immutable, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.Collections.Immutable.8.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.ComponentModel.Annotations.5.0.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ComponentModel.Composition" />
+    <Reference Include="System.ComponentModel.DataAnnotations" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Configuration.ConfigurationManager, Version=10.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Configuration.ConfigurationManager.10.0.1\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Core" />
+    <Reference Include="System.Data.SQLite, Version=1.0.115.5, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
+      <HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\lib\net46\System.Data.SQLite.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Diagnostics.DiagnosticSource.8.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Numerics" />
+    <Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Security" />
+    <Reference Include="System.Security.Cryptography.Xml, Version=8.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Security.Cryptography.Xml.8.0.2\lib\net462\System.Security.Cryptography.Xml.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Channels, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Threading.Channels.8.0.0\lib\net462\System.Threading.Channels.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
+    </Reference>
+    <Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
+      <HintPath>packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
+    </Reference>
+    <Reference Include="System.Windows.Forms.DataVisualization" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+    <Reference Include="WindowsBase" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="AddressEditForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="AddressEditForm.Designer.cs">
+      <DependentUpon>AddressEditForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="AddressesForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="AddressesForm.Designer.cs">
+      <DependentUpon>AddressesForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="AssignManagerForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="AssignManagerForm.Designer.cs">
+      <DependentUpon>AssignManagerForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ChangeStatusForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ChangeStatusForm.Designer.cs">
+      <DependentUpon>ChangeStatusForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ClientEditForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ClientEditForm.Designer.cs">
+      <DependentUpon>ClientEditForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ClientsForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ClientsForm.Designer.cs">
+      <DependentUpon>ClientsForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="DatabaseHelper.cs" />
+    <Compile Include="LoginForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="LoginForm.Designer.cs">
+      <DependentUpon>LoginForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ManagerEditForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ManagerEditForm.Designer.cs">
+      <DependentUpon>ManagerEditForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ManagersForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ManagersForm.Designer.cs">
+      <DependentUpon>ManagersForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="NewRequestForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="NewRequestForm.Designer.cs">
+      <DependentUpon>NewRequestForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="RegisterForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="RegisterForm.Designer.cs">
+      <DependentUpon>RegisterForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ReportForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ReportForm.Designer.cs">
+      <DependentUpon>ReportForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="RequestsForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="RequestsForm.Designer.cs">
+      <DependentUpon>RequestsForm.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Session.cs" />
+    <Compile Include="Main.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Main.Designer.cs">
+      <DependentUpon>Main.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="StartForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="StartForm.Designer.cs">
+      <DependentUpon>StartForm.cs</DependentUpon>
+    </Compile>
+    <EmbeddedResource Include="AddressEditForm.resx">
+      <DependentUpon>AddressEditForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="AddressesForm.resx">
+      <DependentUpon>AddressesForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="AssignManagerForm.resx">
+      <DependentUpon>AssignManagerForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ChangeStatusForm.resx">
+      <DependentUpon>ChangeStatusForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ClientEditForm.resx">
+      <DependentUpon>ClientEditForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ClientsForm.resx">
+      <DependentUpon>ClientsForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="LoginForm.resx">
+      <DependentUpon>LoginForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Main.resx">
+      <DependentUpon>Main.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ManagerEditForm.resx">
+      <DependentUpon>ManagerEditForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ManagersForm.resx">
+      <DependentUpon>ManagersForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <EmbeddedResource Include="RegisterForm.resx">
+      <DependentUpon>RegisterForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="ReportForm.resx">
+      <DependentUpon>ReportForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="RequestsForm.resx">
+      <DependentUpon>RequestsForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="StartForm.resx">
+      <DependentUpon>StartForm.cs</DependentUpon>
+    </EmbeddedResource>
+    <None Include="packages.config" />
+    <None Include="packages\RavenDB.Database.3.5.9\tools\Raven.Studio.Html5.zip">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </None>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <Import Project="packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
+  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
+    <PropertyGroup>
+      <ErrorText>Данный проект ссылается на пакеты NuGet, отсутствующие на этом компьютере. Используйте восстановление пакетов NuGet, чтобы скачать их.  Дополнительную информацию см. по адресу: http://go.microsoft.com/fwlink/?LinkID=322105. Отсутствует следующий файл: {0}.</ErrorText>
+    </PropertyGroup>
+    <Error Condition="!Exists('packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.115.5\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
+  </Target>
+</Project>

+ 25 - 0
WindowsFormsApp4.sln

@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 18
+VisualStudioVersion = 18.5.11716.220
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp4", "WindowsFormsApp4.csproj", "{9DA8271B-CC24-4A80-8548-6DA0D76EA18E}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{9DA8271B-CC24-4A80-8548-6DA0D76EA18E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{9DA8271B-CC24-4A80-8548-6DA0D76EA18E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{9DA8271B-CC24-4A80-8548-6DA0D76EA18E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{9DA8271B-CC24-4A80-8548-6DA0D76EA18E}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+		SolutionGuid = {55FF52C2-45A3-4802-BB1E-9332DF4A4091}
+	EndGlobalSection
+EndGlobal

+ 30 - 0
packages.config

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="DocumentFormat.OpenXml.Framework" version="3.3.0" targetFramework="net472" />
+  <package id="EPPlus" version="4.5.3.3" targetFramework="net472" />
+  <package id="EPPlus.Interfaces" version="8.4.0" targetFramework="net472" />
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" targetFramework="net472" />
+  <package id="Microsoft.Bcl.HashCode" version="1.1.1" targetFramework="net472" />
+  <package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.0" targetFramework="net472" />
+  <package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.0" targetFramework="net472" />
+  <package id="Microsoft.IO.RecyclableMemoryStream" version="3.0.1" targetFramework="net472" />
+  <package id="Npgsql" version="8.0.8" targetFramework="net472" />
+  <package id="RavenDB.Client" version="3.5.9" targetFramework="net472" />
+  <package id="RavenDB.Database" version="3.5.9" targetFramework="net472" />
+  <package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.115.5" targetFramework="net472" />
+  <package id="System.Buffers" version="4.5.1" targetFramework="net472" />
+  <package id="System.Collections.Immutable" version="8.0.0" targetFramework="net472" />
+  <package id="System.ComponentModel.Annotations" version="5.0.0" targetFramework="net472" />
+  <package id="System.Configuration.ConfigurationManager" version="10.0.1" targetFramework="net472" />
+  <package id="System.Data.SQLite.Core" version="1.0.115.5" targetFramework="net472" />
+  <package id="System.Diagnostics.DiagnosticSource" version="8.0.0" targetFramework="net472" />
+  <package id="System.Memory" version="4.5.5" targetFramework="net472" />
+  <package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
+  <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
+  <package id="System.Security.Cryptography.Xml" version="8.0.2" targetFramework="net472" />
+  <package id="System.Text.Encodings.Web" version="8.0.0" targetFramework="net472" />
+  <package id="System.Text.Json" version="8.0.5" targetFramework="net472" />
+  <package id="System.Threading.Channels" version="8.0.0" targetFramework="net472" />
+  <package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
+  <package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
+</packages>