diff --git a/VeterinaryView/VeterinaryBusinessLogic/BusinessLogic/VisitLogic.cs b/VeterinaryView/VeterinaryBusinessLogic/BusinessLogic/VisitLogic.cs index e2a3786..0edf385 100644 --- a/VeterinaryView/VeterinaryBusinessLogic/BusinessLogic/VisitLogic.cs +++ b/VeterinaryView/VeterinaryBusinessLogic/BusinessLogic/VisitLogic.cs @@ -24,7 +24,7 @@ namespace VeterinaryBusinessLogic.BusinessLogic { throw new ArgumentNullException(nameof(model)); } - _logger.LogInformation("ReadElement. Id:{ Id}", model.Id); + _logger.LogInformation("ReadElement. VisitName:{VisitName} Id:{ Id}", model.VisitName, model.Id); var element = _visitStorage.GetElement(model); if (element == null) { @@ -37,9 +37,8 @@ namespace VeterinaryBusinessLogic.BusinessLogic public List? ReadList(VisitSearchModel? model) { - _logger.LogInformation("ReadList. Id:{ Id}", model?.Id); - var list = model == null ? _visitStorage.GetFullList() : - _visitStorage.GetFilteredList(model); + _logger.LogInformation("ReadList. VisitName:{VisitName} Id:{ Id}", model?.VisitName, model?.Id); + var list = model == null ? _visitStorage.GetFullList() : _visitStorage.GetFilteredList(model); if (list == null) { _logger.LogWarning("ReadList return null list"); diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs b/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs index 85f10bf..1f4768f 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs +++ b/VeterinaryView/VeterinaryShowOwnerApp/Controllers/HomeController.cs @@ -221,7 +221,7 @@ namespace VeterinaryShowOwnerApp.Controllers { return Redirect("~/Home/Enter"); } - ViewBag.Pets = APIOwner.GetRequest>($"api/pet/getpet"); + ViewBag.Pets = APIOwner.GetRequest>($"api/pet/getpet?ownerid={APIOwner.Owner.Id}"); return View(); } @@ -232,7 +232,7 @@ namespace VeterinaryShowOwnerApp.Controllers { throw new Exception("Вы как суда попали? Суда вход только авторизованным"); } - if (string.IsNullOrEmpty(name)) + if (string.IsNullOrEmpty(name) || dateTime < DateTime.Now) { throw new Exception("Ошибка в введенных данных"); } diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePet.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePet.cshtml index 57ecb9c..6508997 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePet.cshtml +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/CreatePet.cshtml @@ -3,7 +3,7 @@ }
-

Создание животного

+

Добавление животного

diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/DeleteVisit.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/DeleteVisit.cshtml new file mode 100644 index 0000000..88ee6a5 --- /dev/null +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/DeleteVisit.cshtml @@ -0,0 +1,18 @@ +@{ + ViewData["Title"] = "DeleteVisit"; +} +
+

Удаление визита

+
+ +
+
Визит:
+
+ +
+
+
+
+
+
+ \ No newline at end of file diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Enter.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Enter.cshtml index 5775fac..667088f 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Enter.cshtml +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Enter.cshtml @@ -6,7 +6,7 @@
-
Login:
+
Логин:
diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Index.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Index.cshtml index e88dc60..2905a65 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Index.cshtml +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Index.cshtml @@ -14,7 +14,7 @@ return; }

- Создать животное + Добавить животное Обновить животное Удалить животное

diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/UpdateVisit.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/UpdateVisit.cshtml new file mode 100644 index 0000000..6e9de59 --- /dev/null +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/UpdateVisit.cshtml @@ -0,0 +1,25 @@ +@using VeterinaryContracts.ViewModels; + +@{ + ViewData["Title"] = "UpdateVisit"; +} + +
+

Редактирование визита

+
+ +
+
Визит:
+
+ +
+
+
+
Название:
+
+
+
+
+
+
+ \ No newline at end of file diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Visits.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Visits.cshtml index 40fbd8f..6d51fe7 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Visits.cshtml +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Home/Visits.cshtml @@ -15,6 +15,8 @@ }

Создать визит + Изменить визит + Удалить визит

diff --git a/VeterinaryView/VeterinaryShowOwnerApp/Views/Shared/_Layout.cshtml b/VeterinaryView/VeterinaryShowOwnerApp/Views/Shared/_Layout.cshtml index 0cf6ea1..246d539 100644 --- a/VeterinaryView/VeterinaryShowOwnerApp/Views/Shared/_Layout.cshtml +++ b/VeterinaryView/VeterinaryShowOwnerApp/Views/Shared/_Layout.cshtml @@ -3,7 +3,7 @@ - @ViewData["Title"] - VeterinaryShowOwnerApp + @ViewData["Title"] - Ветеринарная клиника