From 44552435e64b829c5de4a1496e23cade41dac3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=B0=D0=BB=D0=B8=D0=BD=D0=B0=20=D0=A4=D0=B5=D0=B4?= =?UTF-8?q?=D0=BE=D1=80=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Thu, 30 May 2024 11:33:38 +0400 Subject: [PATCH] =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=B4=D0=B5=D0=BB=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../LawFirmDatabase.cs | 4 ++-- .../Controllers/CaseController.cs | 18 +++--------------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 63a806f..23826e6 100644 --- a/.gitignore +++ b/.gitignore @@ -401,3 +401,4 @@ FodyWeavers.xsd /LawFim/LawFirmRestApi/file.pdf /LawFim/LawFirmRestApi/pdf.file /LawFim/LawFirmRestApi/string +/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs diff --git a/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs b/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs index df626d5..7eddff9 100644 --- a/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs +++ b/LawFim/LawFirmDatabaseImplement/LawFirmDatabase.cs @@ -11,9 +11,9 @@ namespace LawFirmDatabaseImplement { if (optionsBuilder.IsConfigured == false) { - //optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=ZIRAEL\SQLEXPRESS;Initial Catalog=LawFirmDatabase;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); - optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase2;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + //optionsBuilder.UseSqlServer(@"Data Source=PC-Anna\SQLEXPRESS;Initial Catalog=LawFirmDatabase2;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } diff --git a/LawFim/LawFirmExecutorApp/Controllers/CaseController.cs b/LawFim/LawFirmExecutorApp/Controllers/CaseController.cs index a507044..2525b28 100644 --- a/LawFim/LawFirmExecutorApp/Controllers/CaseController.cs +++ b/LawFim/LawFirmExecutorApp/Controllers/CaseController.cs @@ -81,11 +81,8 @@ namespace LawFirmExecutorApp.Controllers APIClient.PostRequest("api/case/updatecase", new CaseBindingModel { - ExecutorId = APIClient.Executor.Id, - Name = name, - Status = status, - CaseType = type, - DateCreate = date + Id = id + }); Response.Redirect("/Home/Cases"); } @@ -97,16 +94,7 @@ namespace LawFirmExecutorApp.Controllers throw new Exception("Вы как суда попали? Суда вход только авторизованным"); } - APIClient.PostRequest("api/case/deletecase", new - CaseBindingModel - { - ExecutorId = APIClient.Executor.Id, - Name = "", - Status = CaseStatus.Неизвестен, - CaseType = "", - DateCreate = DateTime.Now - - }); + APIClient.PostRequest("api/case/deletecase", ); Response.Redirect("/Home/Cases"); }