From b39f51f139de2631428f9cd68aec77bc660937d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D1=88=D0=B8=D0=BD=20=D0=9C=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D0=BC?= Date: Fri, 19 May 2023 23:26:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=BE=D0=BC=D0=B6=20=D0=98=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=20=D0=BD=D0=B0=D1=88=D0=B5=D0=BB=20=D0=BD=D0=BE=D1=83?= =?UTF-8?q?=D1=82=D0=B1=D1=83=D0=BA=20=D0=B8=20=D0=B2=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B2=D1=83=D1=8E=20=D0=BE=D1=87=D0=B5=D1=80=D0=B5=D0=B4=D1=8C?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=B8=D0=BB=20=D0=BA?= =?UTF-8?q?=D0=BE=D1=80=D0=B7=D0=B8=D0=BD=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HostrelHeadwaiterApp/Controllers/HomeController.cs | 10 +++++----- Hotel/HotelBusinessLogic/MailWorker/MailKitWorker.cs | 2 +- .../OfficePackage/HelperModels/PdfInfoHeadwaiter.cs | 2 +- .../OfficePackage/HelperModels/PdfInfoOrganiser.cs | 2 +- Hotel/HotelDataBaseImplement/HotelDataBase.cs | 2 +- Hotel/HotelOrganiserApp/Controllers/HomeController.cs | 10 +++++----- Hotel/HotelRestApi/Controllers/ReportController.cs | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Hotel/HostrelHeadwaiterApp/Controllers/HomeController.cs b/Hotel/HostrelHeadwaiterApp/Controllers/HomeController.cs index b0ca776..0c6d1bb 100644 --- a/Hotel/HostrelHeadwaiterApp/Controllers/HomeController.cs +++ b/Hotel/HostrelHeadwaiterApp/Controllers/HomeController.cs @@ -609,7 +609,7 @@ namespace HostrelHeadwaiterApp.Controllers APIClient.PostRequest("api/report/createheadwaiterreporttowordfile", new ReportHeadwaiterBindingModel { Ids = res, - FileName = "E:\\ReportsCourseWork\\wordfile.docx" + FileName = "C:\\ReportsCourseWork\\wordfile.docx" }); Response.Redirect("GetWordFile"); } @@ -618,7 +618,7 @@ namespace HostrelHeadwaiterApp.Controllers APIClient.PostRequest("api/report/createheadwaiterreporttoexcelfile", new ReportHeadwaiterBindingModel { Ids = res, - FileName = "E:\\ReportsCourseWork\\excelfile.xlsx" + FileName = "C:\\ReportsCourseWork\\excelfile.xlsx" }); Response.Redirect("GetExcelFile"); } @@ -627,17 +627,17 @@ namespace HostrelHeadwaiterApp.Controllers [HttpGet] public IActionResult GetWordFile() { - return new PhysicalFileResult("E:\\ReportsCourseWork\\wordfile.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + return new PhysicalFileResult("C:\\ReportsCourseWork\\wordfile.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); } public IActionResult GetExcelFile() { - return new PhysicalFileResult("E:\\ReportsCourseWork\\excelfile.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + return new PhysicalFileResult("C:\\ReportsCourseWork\\excelfile.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); } public IActionResult GetPdfFile() { - return new PhysicalFileResult("E:\\ReportsCourseWork\\pdffile.pdf", "application/pdf"); + return new PhysicalFileResult("C:\\ReportsCourseWork\\pdffile.pdf", "application/pdf"); } [HttpGet] diff --git a/Hotel/HotelBusinessLogic/MailWorker/MailKitWorker.cs b/Hotel/HotelBusinessLogic/MailWorker/MailKitWorker.cs index 5ed2669..c420712 100644 --- a/Hotel/HotelBusinessLogic/MailWorker/MailKitWorker.cs +++ b/Hotel/HotelBusinessLogic/MailWorker/MailKitWorker.cs @@ -30,7 +30,7 @@ namespace HotelBusinessLogic.MailWorker objMailMessage.Body = info.Text; objMailMessage.SubjectEncoding = Encoding.UTF8; objMailMessage.BodyEncoding = Encoding.UTF8; - Attachment attachment = new Attachment("E:\\ReportsCourseWork\\pdffile.pdf", new ContentType(MediaTypeNames.Application.Pdf)); + Attachment attachment = new Attachment("C:\\ReportsCourseWork\\pdffile.pdf", new ContentType(MediaTypeNames.Application.Pdf)); objMailMessage.Attachments.Add(attachment); objSmtpClient.UseDefaultCredentials = false; diff --git a/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoHeadwaiter.cs b/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoHeadwaiter.cs index 99e65e2..b76cac0 100644 --- a/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoHeadwaiter.cs +++ b/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoHeadwaiter.cs @@ -9,7 +9,7 @@ namespace HotelBusinessLogic.OfficePackage.HelperModels { public class PdfInfoHeadwaiter { - public string FileName { get; set; } = "E:\\ReportsCourseWork\\pdffile.pdf"; + public string FileName { get; set; } = "C:\\ReportsCourseWork\\pdffile.pdf"; public string Title { get; set; } = string.Empty; public DateTime DateFrom { get; set; } public DateTime DateTo { get; set; } diff --git a/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoOrganiser.cs b/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoOrganiser.cs index b69a142..d64ce64 100644 --- a/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoOrganiser.cs +++ b/Hotel/HotelBusinessLogic/OfficePackage/HelperModels/PdfInfoOrganiser.cs @@ -4,7 +4,7 @@ namespace HotelBusinessLogic.OfficePackage.HelperModels { public class PdfInfoOrganiser { - public string FileName { get; set; } = "F:\\ReportsCourseWork\\pdffile.pdf"; + public string FileName { get; set; } = "C:\\ReportsCourseWork\\pdffile.pdf"; public string Title { get; set; } = string.Empty; public DateTime DateFrom { get; set; } public DateTime DateTo { get; set; } diff --git a/Hotel/HotelDataBaseImplement/HotelDataBase.cs b/Hotel/HotelDataBaseImplement/HotelDataBase.cs index 5f56ccf..4450886 100644 --- a/Hotel/HotelDataBaseImplement/HotelDataBase.cs +++ b/Hotel/HotelDataBaseImplement/HotelDataBase.cs @@ -9,7 +9,7 @@ namespace HotelDataBaseImplement { if (optionsBuilder.IsConfigured == false) { - optionsBuilder.UseSqlServer(@"Data Source=DESKTOP-V0ON61E\SQLEXPRESS;Initial Catalog=HotelDataBaseFu;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + optionsBuilder.UseSqlServer(@"Data Source=MAKSIM\SQLEXPRESS;Initial Catalog=HotelDataBaseFu;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); } base.OnConfiguring(optionsBuilder); } diff --git a/Hotel/HotelOrganiserApp/Controllers/HomeController.cs b/Hotel/HotelOrganiserApp/Controllers/HomeController.cs index 1c77e9c..7f0bb7d 100644 --- a/Hotel/HotelOrganiserApp/Controllers/HomeController.cs +++ b/Hotel/HotelOrganiserApp/Controllers/HomeController.cs @@ -68,7 +68,7 @@ namespace HotelOrganiserApp.Controllers APIClient.PostRequest("api/report/createreporttowordfile", new ReportBindingModel { Ids = res, - FileName= "F:\\ReportsCourseWork\\wordfile.docx" + FileName= "C:\\ReportsCourseWork\\wordfile.docx" }); Response.Redirect("GetWordFile"); } @@ -77,7 +77,7 @@ namespace HotelOrganiserApp.Controllers APIClient.PostRequest("api/report/createreporttoexcelfile", new ReportBindingModel { Ids = res, - FileName = "F:\\ReportsCourseWork\\excelfile.xlsx" + FileName = "C:\\ReportsCourseWork\\excelfile.xlsx" }); Response.Redirect("GetExcelFile"); } @@ -86,15 +86,15 @@ namespace HotelOrganiserApp.Controllers [HttpGet] public IActionResult GetWordFile() { - return new PhysicalFileResult("F:\\ReportsCourseWork\\wordfile.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + return new PhysicalFileResult("C:\\ReportsCourseWork\\wordfile.docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"); } public IActionResult GetPdfFile() { - return new PhysicalFileResult("F:\\ReportsCourseWork\\pdffile.pdf", "application/pdf"); + return new PhysicalFileResult("C:\\ReportsCourseWork\\pdffile.pdf", "application/pdf"); } public IActionResult GetExcelFile() { - return new PhysicalFileResult("F:\\ReportsCourseWork\\excelfile.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + return new PhysicalFileResult("C:\\ReportsCourseWork\\excelfile.xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); } [HttpGet] diff --git a/Hotel/HotelRestApi/Controllers/ReportController.cs b/Hotel/HotelRestApi/Controllers/ReportController.cs index 3699fc9..6a7ea06 100644 --- a/Hotel/HotelRestApi/Controllers/ReportController.cs +++ b/Hotel/HotelRestApi/Controllers/ReportController.cs @@ -34,7 +34,7 @@ namespace HotelRestApi.Controllers DateFrom = model.DateFrom, DateTo = model.DateTo, OrganiserId = model.OrganiserId, - FileName = "E:\\ReportsCourseWork\\pdffile.pdf", + FileName = "C:\\ReportsCourseWork\\pdffile.pdf", }); } catch (Exception ex) @@ -121,7 +121,7 @@ namespace HotelRestApi.Controllers { _reportHeadwaiterLogic.SaveDinnersToPdfFile(new ReportHeadwaiterBindingModel { - FileName = "E:\\ReportsCourseWork\\pdffile.pdf", + FileName = "C:\\ReportsCourseWork\\pdffile.pdf", DateFrom = model.DateFrom, DateTo = model.DateTo, HeadwaiterId = model.HeadwaiterId,