From 07d7bd61276820ed2f137f6f34e0ad61ab1e8a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=91=D0=B0=D0=BA=D0=B0?= =?UTF-8?q?=D0=BB=D1=8C=D1=81=D0=BA=D0=B0=D1=8F?= Date: Wed, 1 May 2024 00:48:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B8=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B0=D0=BB=D0=B0=20=D0=B2=D1=8C=D1=8E=D1=88?= =?UTF-8?q?=D0=BA=D0=B8=20=D1=81=20=D1=81=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=D0=BC=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D0=B4=D1=83?= =?UTF-8?q?=D1=80=20=D0=B8=20=D0=BF=D1=80=D0=B5=D0=BF=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D0=B2,=20=D0=B0=20=D0=B5=D1=89=D0=B5=20=D0=B4?= =?UTF-8?q?=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=D0=B0=20=D1=8D=D1=82=D1=83?= =?UTF-8?q?=20=D0=BD=D0=B5=D1=81=D1=87=D0=B0=D1=81=D1=82=D0=BD=D1=83=D1=8E?= =?UTF-8?q?=20=D0=B4=D0=B0=D1=82=D1=83=20(=D0=BF=D0=B5=D1=80=D0=B8=D0=BE?= =?UTF-8?q?=D0=B4)=20=D0=B2=20=D0=BF=D1=80=D0=BE=D1=86=D0=B5=D0=B4=D1=83?= =?UTF-8?q?=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BindingModels/ProcedureBindingModel.cs | 3 +++ .../SearchModels/ProcedureSearchModel.cs | 2 ++ .../PolyclinicContracts/ViewModels/ProcedureViewModel.cs | 8 ++++++++ Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs | 2 ++ .../PolyclinicDatabaseImplement/Models/Procedure.cs | 8 ++++++++ .../Views/Home/CreateMedicament.cshtml | 8 ++++++++ .../Views/Home/CreateMedicamentModal.cshtml | 5 ----- .../Views/Home/CreateProcedure.cshtml | 8 ++++++++ .../Views/Home/CreateProcedureModal.cshtml | 5 ----- 9 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicament.cshtml delete mode 100644 Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicamentModal.cshtml create mode 100644 Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedure.cshtml delete mode 100644 Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedureModal.cshtml diff --git a/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs b/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs index 5f09139..d96adcf 100644 --- a/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs +++ b/Polyclinic/PolyclinicContracts/BindingModels/ProcedureBindingModel.cs @@ -8,5 +8,8 @@ namespace PolyclinicContracts.BindingModels public int UserId { get; set; } public string Name { get; set; } = string.Empty; public string Comment { get; set; } = string.Empty; + public DateTime From { get; set; } = DateTime.Now; + public DateTime? To { get; set; } + } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs b/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs index e4d89a7..9e01ee8 100644 --- a/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs +++ b/Polyclinic/PolyclinicContracts/SearchModels/ProcedureSearchModel.cs @@ -4,5 +4,7 @@ { public int? Id { get; set; } public string? Name { get; set; } + public DateTime? From { get; set; } + public DateTime? To { get; set; } } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs b/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs index dccc9d6..7adb600 100644 --- a/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs +++ b/Polyclinic/PolyclinicContracts/ViewModels/ProcedureViewModel.cs @@ -7,9 +7,17 @@ namespace PolyclinicContracts.ViewModels { public int Id { get; set; } public int UserId { get; set; } + [DisplayName("Название процедуры")] public string Name { get; set; } = string.Empty; + [DisplayName("Комментарий")] public string Comment { get; set; } = string.Empty; + + [DisplayName("Дата 'от'")] + public DateTime From { get; set; } = DateTime.Now; + + [DisplayName("Дата 'до'")] + public DateTime? To { get; set; } = DateTime.Now; } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs b/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs index 500e459..d2c3d7d 100644 --- a/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs +++ b/Polyclinic/PolyclinicDataModels/Models/IProcedureModel.cs @@ -5,5 +5,7 @@ string Name { get; } string Comment { get; } int UserId { get; } + DateTime From { get; } + DateTime? To { get; } } } \ No newline at end of file diff --git a/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs b/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs index 7236289..2ade946 100644 --- a/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs +++ b/Polyclinic/PolyclinicDatabaseImplement/Models/Procedure.cs @@ -16,6 +16,10 @@ namespace PolyclinicDatabaseImplement.Models [Required] public string Name { get; set; } = string.Empty; + [Required] + public DateTime From { get; set; } = DateTime.Now; + public DateTime? To { get; set; } + [Required] public string Comment { get; set; } = string.Empty; @@ -27,6 +31,8 @@ namespace PolyclinicDatabaseImplement.Models UserId = bindingModel.UserId, Name = bindingModel.Name, Comment = bindingModel.Comment, + From = bindingModel.From, + To = bindingModel.To, }; } @@ -42,6 +48,8 @@ namespace PolyclinicDatabaseImplement.Models Name = Name, UserId = UserId, Comment = Comment, + From = From, + To = To, }; } } diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicament.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicament.cshtml new file mode 100644 index 0000000..b9dc109 --- /dev/null +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicament.cshtml @@ -0,0 +1,8 @@ +@using PolyclinicContracts.ViewModels +@model List +@{ + ViewData["Title"] = "CreateRecipe"; +} +
+

Создание рецепта

+
\ No newline at end of file diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicamentModal.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicamentModal.cshtml deleted file mode 100644 index e1dd794..0000000 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateMedicamentModal.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@* - For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 -*@ -@{ -} diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedure.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedure.cshtml new file mode 100644 index 0000000..9a7bac4 --- /dev/null +++ b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedure.cshtml @@ -0,0 +1,8 @@ +@using PolyclinicContracts.ViewModels +@model List +@{ + ViewData["Title"] = "CreateRecipe"; +} +
+

Создание рецепта

+
\ No newline at end of file diff --git a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedureModal.cshtml b/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedureModal.cshtml deleted file mode 100644 index e1dd794..0000000 --- a/Polyclinic/PolyclinicWebAppSuretor/Views/Home/CreateProcedureModal.cshtml +++ /dev/null @@ -1,5 +0,0 @@ -@* - For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 -*@ -@{ -}