public IActionResult CreatePrescription() { var doctors = _selectService.GetDoctorSelectList(); var apothecaries = _selectService.GetApothecarySelectList(); if (!doctors.IsSuccess) { return(RedirectToIndex(doctors.FailureMessage)); } if (!apothecaries.IsSuccess) { return(RedirectToIndex(apothecaries.FailureMessage)); } var model = new CreatePrescriptionViewModel { ApothecarySelect = apothecaries.Value, DoctorSelect = doctors.Value, PrescriptionDate = DateTime.Now }; return(View(model)); }
public IActionResult Create() { _logger.LogInfo($"Zapytanie do metody Create()"); var result = _selectService.GetApothecarySelectList(); if (!result.IsSuccess) { return(RedirectToIndex(result.FailureMessage)); } var model = new CreateOrderViewModel { ApothecaryList = result.Value }; return(View(model)); }