Пример #1
0
 public ActionResult Edit(MedicineVM medicine)
 {
     try
     {
         IBL bL = new BlClass();
         medicine.NDC = bL.GetNDCForMedicine(medicine.genericaName);
         if (ModelState.IsValid)
         {
             bL.UpdateMedicine(medicine.Current, medicine.img);
             ViewBag.TitlePopUp = "עבר בהצלחה";
             ViewBag.Message    = "התרופה עודכנה בהצלחה במאגר התרופות";
             return(View("Index", new MedicineModel().getMedicineVms()));
         }
         return(View(medicine));
     }
     catch (Exception ex)
     {
         ViewBag.TitlePopUp = "שגיאה";
         ViewBag.Message    = ex.Message;
         return(View(medicine));
     }
 }