Beispiel #1
0
        public ActionResult EditInstrument(Instrument instrumentModel)
        {
            GetHospitalViewInformation();
            //instrumentModel.hospital = indexForHospitalInfoViewModel.hospita`l;
            ModelState.Remove("hospital");
            List <string> errorMessage = new List <string>();

            if (!ModelState.IsValid)
            {
                return(PartialView("_EditInstrument", instrumentModel));
            }

            //Updating hospitalInfo
            if (indexForHospitalInfoViewModel.EditInstrument(instrumentModel, out errorMessage))
            {
                GetHospitalViewInformation();
                return(RedirectToAction("Index"));//View("IndexForHospitalInfo",indexForHospitalInfoViewModel);
            }
            //return JavaScript("window.close();");
            return(JavaScript("alert(" + errorMessage.First() + ");"));
        }