public ActionResult AgentDoctorRegisterPackages(int medicationTypeId, string expireDate, string submit) { var model = GetRegisteringViewModel(); if (submit == "Refresh") { model.SelectedMedicationType = MedicationTypeBLL.GetMedicationTypeById(medicationTypeId); } else { try { string barcode = MedicationPackageBLL.RegisterPackage(medicationTypeId, expireDate); model.Barcode = barcode; model.Result = new Notification { Level = NotificationLevel.Info, Message = "Register package succeeded" }; } catch (ENETCareException ex) { model.Result = new Notification { Level = NotificationLevel.Error, Message = ex.Message }; } } ModelState.Clear(); return(View(model)); }
RegisteringViewModel GetRegisteringViewModel() { RegisteringViewModel model = new RegisteringViewModel(); List <MedicationType> list = MedicationTypeBLL.GetMedicationTypeList(); model.MedicationTypes = list; model.SelectedMedicationType = list.FirstOrDefault(); return(model); }
public ActionResult AgentDoctorAuditPackageTask() { return(View(MedicationTypeBLL.GetMedicationTypeList())); }