From cf0999d6eb7cc123746d170db87390245642db52 Mon Sep 17 00:00:00 2001 From: Allllen4a Date: Fri, 31 May 2024 10:25:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=BD=D0=BE=20=D0=B7=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82=20=D0=BA=D0=BE=D0=B3=D0=B4?= =?UTF-8?q?=D0=B0-=D0=BD=D0=B8=D0=B1=D1=83=D0=B4=D1=8C=20=D0=B8=D0=BB?= =?UTF-8?q?=D0=B8=20=D0=BD=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BeautySalonView/ClientWebApp/APIWorker.cs | 3 +- .../Controllers/HomeController.cs | 8 ++-- .../ClientWebApp/Views/Home/Enter.cshtml | 30 +++++++-------- .../ClientWebApp/Views/Home/Register.cshtml | 37 +++++++++---------- 4 files changed, 38 insertions(+), 40 deletions(-) diff --git a/BeautySalonView/ClientWebApp/APIWorker.cs b/BeautySalonView/ClientWebApp/APIWorker.cs index b34cc90..5ea2bd4 100644 --- a/BeautySalonView/ClientWebApp/APIWorker.cs +++ b/BeautySalonView/ClientWebApp/APIWorker.cs @@ -1,4 +1,5 @@ using BeautySalonContracts.ViewModels; +using BeautySalonDatabaseImplement.Models; using Newtonsoft.Json; using System.Net.Http.Headers; using System.Text; @@ -22,7 +23,6 @@ namespace WorkerWebApp { var response = _worker.GetAsync(requestUrl); var result = response.Result.Content.ReadAsStringAsync().Result; - if (response.Result.IsSuccessStatusCode) { return JsonConvert.DeserializeObject(result); @@ -41,7 +41,6 @@ namespace WorkerWebApp var response = _worker.PostAsync(requestUrl, data); var result = response.Result.Content.ReadAsStringAsync().Result; - if (!response.Result.IsSuccessStatusCode) { throw new Exception(result); diff --git a/BeautySalonView/ClientWebApp/Controllers/HomeController.cs b/BeautySalonView/ClientWebApp/Controllers/HomeController.cs index 1881a07..514c121 100644 --- a/BeautySalonView/ClientWebApp/Controllers/HomeController.cs +++ b/BeautySalonView/ClientWebApp/Controllers/HomeController.cs @@ -182,7 +182,9 @@ namespace WorkerWebApp.Controllers var data = _reportLogic.GetOrders(new ReportOrderBindingModel { DateFrom = dateFrom, - DateTo = dateTo + DateTo = dateTo, + WorkerId = APIWorker.Worker.Id + }); ViewBag.Procedures = _procedureLogic.ReadList(new ProcedureSearchModel @@ -207,7 +209,7 @@ namespace WorkerWebApp.Controllers if (procedures == null || procedures.Count <= 0) { - throw new Exception("Не выбраны рецепты!"); + throw new Exception("Не выбраны процедуры!"); } _reportLogic.SaveProcedureCosmeticsToWordFile(new ReportBindingModel @@ -234,7 +236,7 @@ namespace WorkerWebApp.Controllers if (procedures == null || procedures.Count <= 0) { - throw new Exception("Не выбраны рецепты!"); + throw new Exception("Не выбраны процедуры!"); } _reportLogic.SaveProcedureCosmeticsToExcelFile(new ReportBindingModel diff --git a/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml index 106d3d5..57576f8 100644 --- a/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml +++ b/BeautySalonView/ClientWebApp/Views/Home/Enter.cshtml @@ -1,21 +1,19 @@ @{ - ViewData["Title"] = "Enter"; + ViewData["Title"] = "Вход"; } -
-

Вход в приложение

-
+

Вход в приложение

+
-
-
Логин:
-
-
-
-
Пароль:
-
-
-
-
-
-
+
+ + +
+
+ + +
+
\ No newline at end of file diff --git a/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml b/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml index 286d65c..87f3b84 100644 --- a/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml +++ b/BeautySalonView/ClientWebApp/Views/Home/Register.cshtml @@ -1,26 +1,25 @@ @{ - ViewData["Title"] = "Register"; + ViewData["Title"] = "Регистрация"; } -
-

Регистрация

-
+ +

Регистрация

+
-
-
Логин (электронная почта):
-
+
+ +
-
-
Пароль:
-
+
+ +
-
-
ваше ФИО:
+
+ +
-
-
-
- -
+
+
- \ No newline at end of file +