From 070ab07e7fb94e6540969e0c706e4cb14badb15f Mon Sep 17 00:00:00 2001 From: frog24 Date: Wed, 29 May 2024 18:15:38 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B0=D0=BF=D0=BA=D1=83=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D1=8F=D0=BB,=20=D0=B1=D0=B4=20=D0=B1=D1=80?= =?UTF-8?q?=D0=BE=D0=BF=D0=BD=D1=83=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Vetclinic/DoctorApp/Controllers/HomeController.cs | 8 ++++---- ...hope4.Designer.cs => 20240529134004_hope5.Designer.cs} | 7 +++++-- .../{20240529103650_hope4.cs => 20240529134004_hope5.cs} | 5 +++-- .../Migrations/VetclinicDatabaseModelSnapshot.cs | 3 +++ 4 files changed, 15 insertions(+), 8 deletions(-) rename Vetclinic/VetclinicDatabaseImplement/Migrations/{20240529103650_hope4.Designer.cs => 20240529134004_hope5.Designer.cs} (99%) rename Vetclinic/VetclinicDatabaseImplement/Migrations/{20240529103650_hope4.cs => 20240529134004_hope5.cs} (99%) diff --git a/Vetclinic/DoctorApp/Controllers/HomeController.cs b/Vetclinic/DoctorApp/Controllers/HomeController.cs index 29c4a2d..47cb1b6 100644 --- a/Vetclinic/DoctorApp/Controllers/HomeController.cs +++ b/Vetclinic/DoctorApp/Controllers/HomeController.cs @@ -540,7 +540,7 @@ namespace DoctorApp.Controllers APIDoctor.PostRequest("api/report/createpurchaselistwordfile", new ReportPurchaseMedicineBindingModel { Medicines = medicines, - FileName = "C:\\Users\\1\\Downloads\\wordfile.docx" + FileName = "D:\\jopa\\wordfile.docx" }); Response.Redirect("GetWordFile"); } @@ -549,7 +549,7 @@ namespace DoctorApp.Controllers APIDoctor.PostRequest("api/report/createpurchaselistexcelfile", new ReportPurchaseMedicineBindingModel { Medicines = medicines, - FileName = "C:\\Users\\1\\Downloads\\excelfile.xlsx" + FileName = "D:\\jopa\\excelfile.xlsx" }); Response.Redirect("GetExcelFile"); } @@ -558,12 +558,12 @@ namespace DoctorApp.Controllers [HttpGet] public IActionResult GetWordFile() { - return new PhysicalFileResult("C:\\Users\\1\\Downloads\\wordfile.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + return new PhysicalFileResult("D:\\jopa\\wordfile.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); } public IActionResult GetExcelFile() { - return new PhysicalFileResult("C:\\Users\\1\\Downloads\\excelfile.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + return new PhysicalFileResult("D:\\jopa\\excelfile.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); } [HttpGet] public IActionResult MedicinesDrugsAndVisits() diff --git a/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529103650_hope4.Designer.cs b/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529134004_hope5.Designer.cs similarity index 99% rename from Vetclinic/VetclinicDatabaseImplement/Migrations/20240529103650_hope4.Designer.cs rename to Vetclinic/VetclinicDatabaseImplement/Migrations/20240529134004_hope5.Designer.cs index 3f79805..235fb1e 100644 --- a/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529103650_hope4.Designer.cs +++ b/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529134004_hope5.Designer.cs @@ -12,8 +12,8 @@ using VetclinicDatabaseImplement; namespace VetclinicDatabaseImplement.Migrations { [DbContext(typeof(VetclinicDatabase))] - [Migration("20240529103650_hope4")] - partial class hope4 + [Migration("20240529134004_hope5")] + partial class hope5 { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -191,6 +191,9 @@ namespace VetclinicDatabaseImplement.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + b.Property("DateCreate") + .HasColumnType("datetime2"); + b.Property("DoctorId") .HasColumnType("int"); diff --git a/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529103650_hope4.cs b/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529134004_hope5.cs similarity index 99% rename from Vetclinic/VetclinicDatabaseImplement/Migrations/20240529103650_hope4.cs rename to Vetclinic/VetclinicDatabaseImplement/Migrations/20240529134004_hope5.cs index 913ce1e..461c196 100644 --- a/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529103650_hope4.cs +++ b/Vetclinic/VetclinicDatabaseImplement/Migrations/20240529134004_hope5.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations; namespace VetclinicDatabaseImplement.Migrations { /// - public partial class hope4 : Migration + public partial class hope5 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) @@ -71,7 +71,8 @@ namespace VetclinicDatabaseImplement.Migrations .Annotation("SqlServer:Identity", "1, 1"), DrugName = table.Column(type: "nvarchar(max)", nullable: false), Price = table.Column(type: "float", nullable: false), - DoctorId = table.Column(type: "int", nullable: false) + DoctorId = table.Column(type: "int", nullable: false), + DateCreate = table.Column(type: "datetime2", nullable: false) }, constraints: table => { diff --git a/Vetclinic/VetclinicDatabaseImplement/Migrations/VetclinicDatabaseModelSnapshot.cs b/Vetclinic/VetclinicDatabaseImplement/Migrations/VetclinicDatabaseModelSnapshot.cs index 69eb34d..71063ad 100644 --- a/Vetclinic/VetclinicDatabaseImplement/Migrations/VetclinicDatabaseModelSnapshot.cs +++ b/Vetclinic/VetclinicDatabaseImplement/Migrations/VetclinicDatabaseModelSnapshot.cs @@ -188,6 +188,9 @@ namespace VetclinicDatabaseImplement.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + b.Property("DateCreate") + .HasColumnType("datetime2"); + b.Property("DoctorId") .HasColumnType("int");