Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        RegisteringViewModel GetRegisteringViewModel()
        {
            RegisteringViewModel  model = new RegisteringViewModel();
            List <MedicationType> list  = MedicationTypeBLL.GetMedicationTypeList();

            model.MedicationTypes        = list;
            model.SelectedMedicationType = list.FirstOrDefault();
            return(model);
        }
Ejemplo n.º 3
0
 public ActionResult AgentDoctorAuditPackageTask()
 {
     return(View(MedicationTypeBLL.GetMedicationTypeList()));
 }