Исполнитель: фикс
This commit is contained in:
parent
f51581478b
commit
fb308637e4
@ -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<VisitViewModel>? 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");
|
||||
|
@ -212,7 +212,7 @@ namespace VeterinaryShowOwnerApp.Controllers
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
return View(APIOwner.GetRequest<List<VisitViewModel>>($"api/visit/getvisit?ownerid={APIOwner.Owner.Id}"));
|
||||
return View(APIOwner.GetRequest<List<VisitViewModel>>($"api/visit/getvisits?ownerid={APIOwner.Owner.Id}"));
|
||||
|
||||
}
|
||||
public IActionResult CreateVisit()
|
||||
@ -221,7 +221,7 @@ namespace VeterinaryShowOwnerApp.Controllers
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
}
|
||||
ViewBag.Pets = APIOwner.GetRequest<List<PetViewModel>>($"api/pet/getpet");
|
||||
ViewBag.Pets = APIOwner.GetRequest<List<PetViewModel>>($"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("Ошибка в введенных данных");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user