public IActionResult AddOrderItem(int orderId) { _logger.LogInfo($"Zapytanie do metody AddOrderItem(orderId)", new { orderId }); var result = _selectService.GetMedicineSelectList(); if (!result.IsSuccess) { return(RedirectToDetails(orderId, result.FailureMessage)); } var model = new AddOrderItemViewModel { OrderId = orderId, MedicineList = result.Value }; return(View(model)); }
private IActionResult AddSelectListToModelWithRedirectToDetails(AddPrescriptionItemViewModel model) { var medicine = _selectService.GetMedicineSelectList(); if (!medicine.IsSuccess) { return(RedirectToPrescriptionDetails(model.Id, medicine.FailureMessage)); } model.MedicineList = medicine.Value; return(null); }