diff --git a/AutoWorkshopContracts/ViewModels/RepairCount.cs b/AutoWorkshopContracts/ViewModels/RepairCount.cs new file mode 100644 index 0000000..e0a9728 --- /dev/null +++ b/AutoWorkshopContracts/ViewModels/RepairCount.cs @@ -0,0 +1,9 @@ +namespace AutoWorkshopContracts.ViewModels +{ + public class RepairCount + { + public RepairViewModel Repair { get; set; } = new(); + + public int Count { get; set; } = new(); + } +} diff --git a/AutoWorkshopContracts/ViewModels/ShopRepairViewModel.cs b/AutoWorkshopContracts/ViewModels/ShopRepairViewModel.cs new file mode 100644 index 0000000..13cbe0a --- /dev/null +++ b/AutoWorkshopContracts/ViewModels/ShopRepairViewModel.cs @@ -0,0 +1,9 @@ +namespace AutoWorkshopContracts.ViewModels +{ + public class ShopRepairViewModel + { + public ShopViewModel Shop { get; set; } = new(); + + public Dictionary ShopRepairs { get; set; } = new(); + } +} diff --git a/AutoWorkshopDatabaseImplement/Migrations/20240505173724_Fix Shop-Repair relationship.cs b/AutoWorkshopDatabaseImplement/Migrations/20240505173724_Fix Shop-Repair relationship.cs deleted file mode 100644 index 1738a1e..0000000 --- a/AutoWorkshopDatabaseImplement/Migrations/20240505173724_Fix Shop-Repair relationship.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace AutoWorkshopDatabaseImplement.Migrations -{ - /// - public partial class FixShopRepairrelationship : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - - } - } -} diff --git a/AutoWorkshopDatabaseImplement/Migrations/20240505173724_Fix Shop-Repair relationship.Designer.cs b/AutoWorkshopDatabaseImplement/Migrations/20240514192226_Lab5_Hard.Designer.cs similarity index 84% rename from AutoWorkshopDatabaseImplement/Migrations/20240505173724_Fix Shop-Repair relationship.Designer.cs rename to AutoWorkshopDatabaseImplement/Migrations/20240514192226_Lab5_Hard.Designer.cs index ac63286..2368c01 100644 --- a/AutoWorkshopDatabaseImplement/Migrations/20240505173724_Fix Shop-Repair relationship.Designer.cs +++ b/AutoWorkshopDatabaseImplement/Migrations/20240514192226_Lab5_Hard.Designer.cs @@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; namespace AutoWorkshopDatabaseImplement.Migrations { [DbContext(typeof(AutoWorkshopDatabase))] - [Migration("20240505173724_Fix Shop-Repair relationship")] - partial class FixShopRepairrelationship + [Migration("20240514192226_Lab5_Hard")] + partial class Lab5_Hard { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -25,6 +25,31 @@ namespace AutoWorkshopDatabaseImplement.Migrations NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Client", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClientFIO") + .IsRequired() + .HasColumnType("text"); + + b.Property("Email") + .IsRequired() + .HasColumnType("text"); + + b.Property("Password") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Clients"); + }); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Component", b => { b.Property("Id") @@ -53,6 +78,9 @@ namespace AutoWorkshopDatabaseImplement.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + b.Property("ClientId") + .HasColumnType("integer"); + b.Property("Count") .HasColumnType("integer"); @@ -73,6 +101,8 @@ namespace AutoWorkshopDatabaseImplement.Migrations b.HasKey("Id"); + b.HasIndex("ClientId"); + b.HasIndex("RepairId"); b.ToTable("Orders"); @@ -179,12 +209,20 @@ namespace AutoWorkshopDatabaseImplement.Migrations modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Order", b => { + b.HasOne("AutoWorkshopDatabaseImplement.Models.Client", "Client") + .WithMany("Orders") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + b.HasOne("AutoWorkshopDatabaseImplement.Models.Repair", "Repair") .WithMany("Orders") .HasForeignKey("RepairId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Client"); + b.Navigation("Repair"); }); @@ -226,6 +264,11 @@ namespace AutoWorkshopDatabaseImplement.Migrations b.Navigation("Shop"); }); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Client", b => + { + b.Navigation("Orders"); + }); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Component", b => { b.Navigation("RepairComponents"); diff --git a/AutoWorkshopDatabaseImplement/Migrations/20240514192226_Lab5_Hard.cs b/AutoWorkshopDatabaseImplement/Migrations/20240514192226_Lab5_Hard.cs new file mode 100644 index 0000000..29cdd80 --- /dev/null +++ b/AutoWorkshopDatabaseImplement/Migrations/20240514192226_Lab5_Hard.cs @@ -0,0 +1,215 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace AutoWorkshopDatabaseImplement.Migrations +{ + /// + public partial class Lab5_Hard : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "Clients", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + ClientFIO = table.Column(type: "text", nullable: false), + Email = table.Column(type: "text", nullable: false), + Password = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Clients", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Components", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + ComponentName = table.Column(type: "text", nullable: false), + Cost = table.Column(type: "double precision", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Components", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Repairs", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + RepairName = table.Column(type: "text", nullable: false), + Price = table.Column(type: "double precision", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Repairs", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Shops", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + ShopName = table.Column(type: "text", nullable: false), + Address = table.Column(type: "text", nullable: false), + OpeningDate = table.Column(type: "timestamp without time zone", nullable: false), + RepairsMaxCount = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_Shops", x => x.Id); + }); + + migrationBuilder.CreateTable( + name: "Orders", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + RepairId = table.Column(type: "integer", nullable: false), + ClientId = table.Column(type: "integer", nullable: false), + Count = table.Column(type: "integer", nullable: false), + Sum = table.Column(type: "double precision", nullable: false), + Status = table.Column(type: "integer", nullable: false), + DateCreate = table.Column(type: "timestamp without time zone", nullable: false), + DateImplement = table.Column(type: "timestamp without time zone", nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_Orders", x => x.Id); + table.ForeignKey( + name: "FK_Orders_Clients_ClientId", + column: x => x.ClientId, + principalTable: "Clients", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_Orders_Repairs_RepairId", + column: x => x.RepairId, + principalTable: "Repairs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "RepairComponents", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + RepairId = table.Column(type: "integer", nullable: false), + ComponentId = table.Column(type: "integer", nullable: false), + Count = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_RepairComponents", x => x.Id); + table.ForeignKey( + name: "FK_RepairComponents_Components_ComponentId", + column: x => x.ComponentId, + principalTable: "Components", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_RepairComponents_Repairs_RepairId", + column: x => x.RepairId, + principalTable: "Repairs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateTable( + name: "ShopRepairs", + columns: table => new + { + Id = table.Column(type: "integer", nullable: false) + .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn), + RepairId = table.Column(type: "integer", nullable: false), + ShopId = table.Column(type: "integer", nullable: false), + Count = table.Column(type: "integer", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_ShopRepairs", x => x.Id); + table.ForeignKey( + name: "FK_ShopRepairs_Repairs_RepairId", + column: x => x.RepairId, + principalTable: "Repairs", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + table.ForeignKey( + name: "FK_ShopRepairs_Shops_ShopId", + column: x => x.ShopId, + principalTable: "Shops", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "IX_Orders_ClientId", + table: "Orders", + column: "ClientId"); + + migrationBuilder.CreateIndex( + name: "IX_Orders_RepairId", + table: "Orders", + column: "RepairId"); + + migrationBuilder.CreateIndex( + name: "IX_RepairComponents_ComponentId", + table: "RepairComponents", + column: "ComponentId"); + + migrationBuilder.CreateIndex( + name: "IX_RepairComponents_RepairId", + table: "RepairComponents", + column: "RepairId"); + + migrationBuilder.CreateIndex( + name: "IX_ShopRepairs_RepairId", + table: "ShopRepairs", + column: "RepairId"); + + migrationBuilder.CreateIndex( + name: "IX_ShopRepairs_ShopId", + table: "ShopRepairs", + column: "ShopId"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Orders"); + + migrationBuilder.DropTable( + name: "RepairComponents"); + + migrationBuilder.DropTable( + name: "ShopRepairs"); + + migrationBuilder.DropTable( + name: "Clients"); + + migrationBuilder.DropTable( + name: "Components"); + + migrationBuilder.DropTable( + name: "Repairs"); + + migrationBuilder.DropTable( + name: "Shops"); + } + } +} diff --git a/AutoWorkshopDatabaseImplement/Migrations/AutoWorkshopDatabaseModelSnapshot.cs b/AutoWorkshopDatabaseImplement/Migrations/AutoWorkshopDatabaseModelSnapshot.cs index 7dc1d54..9d9e6f9 100644 --- a/AutoWorkshopDatabaseImplement/Migrations/AutoWorkshopDatabaseModelSnapshot.cs +++ b/AutoWorkshopDatabaseImplement/Migrations/AutoWorkshopDatabaseModelSnapshot.cs @@ -22,6 +22,31 @@ namespace AutoWorkshopDatabaseImplement.Migrations NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Client", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + + b.Property("ClientFIO") + .IsRequired() + .HasColumnType("text"); + + b.Property("Email") + .IsRequired() + .HasColumnType("text"); + + b.Property("Password") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("Id"); + + b.ToTable("Clients"); + }); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Component", b => { b.Property("Id") @@ -50,6 +75,9 @@ namespace AutoWorkshopDatabaseImplement.Migrations NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id")); + b.Property("ClientId") + .HasColumnType("integer"); + b.Property("Count") .HasColumnType("integer"); @@ -70,6 +98,8 @@ namespace AutoWorkshopDatabaseImplement.Migrations b.HasKey("Id"); + b.HasIndex("ClientId"); + b.HasIndex("RepairId"); b.ToTable("Orders"); @@ -176,12 +206,20 @@ namespace AutoWorkshopDatabaseImplement.Migrations modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Order", b => { + b.HasOne("AutoWorkshopDatabaseImplement.Models.Client", "Client") + .WithMany("Orders") + .HasForeignKey("ClientId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + b.HasOne("AutoWorkshopDatabaseImplement.Models.Repair", "Repair") .WithMany("Orders") .HasForeignKey("RepairId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); + b.Navigation("Client"); + b.Navigation("Repair"); }); @@ -223,6 +261,11 @@ namespace AutoWorkshopDatabaseImplement.Migrations b.Navigation("Shop"); }); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Client", b => + { + b.Navigation("Orders"); + }); + modelBuilder.Entity("AutoWorkshopDatabaseImplement.Models.Component", b => { b.Navigation("RepairComponents"); diff --git a/AutoWorkshopFileImplement/DataFileSingleton.cs b/AutoWorkshopFileImplement/DataFileSingleton.cs index 776dab0..5a0761c 100644 --- a/AutoWorkshopFileImplement/DataFileSingleton.cs +++ b/AutoWorkshopFileImplement/DataFileSingleton.cs @@ -11,9 +11,6 @@ namespace AutoWorkshopFileImplement private readonly string OrderFileName = "Order.xml"; private readonly string RepairFileName = "Repair.xml"; private readonly string ShopFileName = "Shop.xml"; - - public List Components { get; private set; } - public List Orders { get; private set; } private readonly string ClientFileName = "Client.xml"; public List Components { get; private set; } @@ -21,9 +18,9 @@ namespace AutoWorkshopFileImplement public List Orders { get; private set; } public List Repairs { get; private set; } + public List Shops { get; private set; } - public List Clients { get; private set; } private DataFileSingleton() diff --git a/AutoWorkshopRestApi/ApiConfig.cs b/AutoWorkshopRestApi/ApiConfig.cs new file mode 100644 index 0000000..26247db --- /dev/null +++ b/AutoWorkshopRestApi/ApiConfig.cs @@ -0,0 +1,12 @@ +namespace AutoWorkshopRestApi +{ + public class ApiConfig + { + public static string? ShopPassword; + + public static void LoadData(IConfiguration Configuration) + { + ShopPassword = Configuration["ShopApiPassword"]; + } + } +} diff --git a/AutoWorkshopRestApi/Controllers/ShopController.cs b/AutoWorkshopRestApi/Controllers/ShopController.cs new file mode 100644 index 0000000..16247d5 --- /dev/null +++ b/AutoWorkshopRestApi/Controllers/ShopController.cs @@ -0,0 +1,156 @@ +using AutoWorkshopContracts.BindingModels; +using AutoWorkshopContracts.BusinessLogicsContracts; +using AutoWorkshopContracts.SearchModels; +using AutoWorkshopContracts.ViewModels; +using Microsoft.AspNetCore.Mvc; + +namespace AutoWorkshopRestApi.Controllers +{ + [Route("api/[controller]/[action]")] + [ApiController] + public class ShopController : Controller + { + private readonly ILogger _logger; + private readonly IShopLogic _shopLogic; + + public ShopController(ILogger Logger, IShopLogic ShopLogic) + { + _logger = Logger; + _shopLogic = ShopLogic; + } + + [HttpGet] + public bool Authentication(string Password) + { + return CheckPassword(Password); + } + + [HttpGet] + public List? GetShopList(string Password) + { + if (!CheckPassword(Password)) + { + return null; + } + try + { + return _shopLogic.ReadList(null); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка получения списка магазинов"); + throw; + } + } + + [HttpGet] + public ShopRepairViewModel? GetShop(int ShopId, string Password) + { + if (!CheckPassword(Password)) + { + return null; + } + try + { + var Shop = _shopLogic.ReadElement(new ShopSearchModel { Id = ShopId }); + return new ShopRepairViewModel + { + Shop = Shop, + ShopRepairs = Shop.ShopRepairs.ToDictionary(x => x.Key, x => new RepairCount + { + Repair = new RepairViewModel() + { + Id = x.Value.Item1.Id, + RepairName = x.Value.Item1.RepairName, + RepairComponents = x.Value.Item1.RepairComponents, + Price = x.Value.Item1.Price, + }, + Count = x.Value.Item2 + }) + }; + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка получения магазина"); + throw; + } + } + + [HttpPost] + public void CreateShop(ShopBindingModel Model, string Password) + { + if (!CheckPassword(Password)) + { + return; + } + try + { + _shopLogic.Create(Model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка создания магазина"); + throw; + } + } + + [HttpPost] + public void UpdateShop(ShopBindingModel Model, string Password) + { + if (!CheckPassword(Password)) + { + return; + } + try + { + _shopLogic.Update(Model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка обновления магазина"); + throw; + } + } + + [HttpDelete] + public void DeleteShop(int ShopId, string Password) + { + if (!CheckPassword(Password)) + { + return; + } + try + { + _shopLogic.Delete(new ShopBindingModel { Id = ShopId }); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка удаления магазина"); + throw; + } + } + + [HttpPost] + public void MakeSypply(SupplyBindingModel Model, string Password) + { + if (!CheckPassword(Password)) + { + return; + } + try + { + _shopLogic.MakeSupply(Model); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка создания поставки в магазин"); + throw; + } + } + + private bool CheckPassword(string Password) + { + return ApiConfig.ShopPassword == Password; + } + } +} diff --git a/AutoWorkshopRestApi/Program.cs b/AutoWorkshopRestApi/Program.cs index c494172..dca012c 100644 --- a/AutoWorkshopRestApi/Program.cs +++ b/AutoWorkshopRestApi/Program.cs @@ -1,7 +1,9 @@ using AutoWorkshopBusinessLogic.BusinessLogics; using AutoWorkshopContracts.BusinessLogicContracts; +using AutoWorkshopContracts.BusinessLogicsContracts; using AutoWorkshopContracts.StoragesContracts; using AutoWorkshopDatabaseImplement.Implements; +using AutoWorkshopRestApi; using Microsoft.OpenApi.Models; var Builder = WebApplication.CreateBuilder(args); @@ -12,9 +14,13 @@ Builder.Logging.AddLog4Net("log4net.config"); Builder.Services.AddTransient(); Builder.Services.AddTransient(); Builder.Services.AddTransient(); +Builder.Services.AddTransient(); + Builder.Services.AddTransient(); Builder.Services.AddTransient(); Builder.Services.AddTransient(); +Builder.Services.AddTransient(); + Builder.Services.AddControllers(); Builder.Services.AddEndpointsApiExplorer(); @@ -28,6 +34,7 @@ Builder.Services.AddSwaggerGen(c => }); var App = Builder.Build(); +ApiConfig.LoadData(Builder.Configuration); if (App.Environment.IsDevelopment()) { diff --git a/AutoWorkshopRestApi/appsettings.json b/AutoWorkshopRestApi/appsettings.json index 10f68b8..98abc52 100644 --- a/AutoWorkshopRestApi/appsettings.json +++ b/AutoWorkshopRestApi/appsettings.json @@ -5,5 +5,6 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "ShopApiPassword": "8841" } diff --git a/AutoWorkshopView/MainForm.Designer.cs b/AutoWorkshopView/MainForm.Designer.cs index e6e2765..9b3d1c3 100644 --- a/AutoWorkshopView/MainForm.Designer.cs +++ b/AutoWorkshopView/MainForm.Designer.cs @@ -120,21 +120,14 @@ ReportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { ReportRepairsToolStripMenuItem, ReportRepCompToolStripMenuItem, OrdersToolStripMenuItem, ReportShopsToolStripMenuItem, RepostBusyShopsToolStripMenuItem, ReportGroupOrdersToolStripMenuItem }); ReportsToolStripMenuItem.Name = "ReportsToolStripMenuItem"; ReportsToolStripMenuItem.Size = new Size(60, 20); - // - // ClientsToolStripMenuItem - // - ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem"; + ReportsToolStripMenuItem.Text = "Отчёты"; + // + // ClientsToolStripMenuItem + // + ClientsToolStripMenuItem.Name = "ClientsToolStripMenuItem"; ClientsToolStripMenuItem.Size = new Size(182, 26); ClientsToolStripMenuItem.Text = "Клиенты"; ClientsToolStripMenuItem.Click += ClientsToolStripMenuItem_Click; - // - // ReportsToolStripMenuItem - // - ReportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { - ComponentsToolStripMenuItem1, - ComponentRepairToolStripMenuItem1, - OrdersToolStripMenuItem}); - ReportsToolStripMenuItem.Text = "Отчёты"; // // ReportRepairsToolStripMenuItem // @@ -289,11 +282,9 @@ private ToolStripMenuItem ReportRepairsToolStripMenuItem; private ToolStripMenuItem ReportRepCompToolStripMenuItem; private ToolStripMenuItem OrdersToolStripMenuItem; - private ToolStripMenuItem OrdersToolStripMenuItem; private ToolStripMenuItem ReportShopsToolStripMenuItem; - private ToolStripMenuItem ClientsToolStripMenuItem; - } + private ToolStripMenuItem RepostBusyShopsToolStripMenuItem; private ToolStripMenuItem ReportGroupOrdersToolStripMenuItem; - private ToolStripMenuItem ClientsToolStripMenuItem; + private ToolStripMenuItem ClientsToolStripMenuItem; } } \ No newline at end of file diff --git a/AutoWorkshopView/MainForm.cs b/AutoWorkshopView/MainForm.cs index fd46123..da66a34 100644 --- a/AutoWorkshopView/MainForm.cs +++ b/AutoWorkshopView/MainForm.cs @@ -261,7 +261,6 @@ namespace AutoWorkshopView Form.ShowDialog(); } } - } private void ClientsToolStripMenuItem_Click(object sender, EventArgs e) { diff --git a/AutoWorkshopView/Program.cs b/AutoWorkshopView/Program.cs index c84e042..f895b74 100644 --- a/AutoWorkshopView/Program.cs +++ b/AutoWorkshopView/Program.cs @@ -42,14 +42,14 @@ namespace AutoWorkshopView Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); - + Services.AddTransient(); + Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); - Services.AddTransient(); - Services.AddTransient(); + Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); @@ -70,7 +70,6 @@ namespace AutoWorkshopView Services.AddTransient(); Services.AddTransient(); Services.AddTransient(); - } Services.AddTransient(); } }