public ActionResult OTRegistration() { OTRegistration obj = new OTRegistration(); obj.GetMultipleDoctor(); obj.GetMultipleNurse(); return(View(obj)); }
public ActionResult OTRegistrationUpdate(OTRegistration obj, string SubmitBtn) { OTRegistration(obj, SubmitBtn); if (SubmitBtn == "Delete") { return(Redirect("~/Patient/PatientOTDetails")); } return(View("OTRegistration", obj)); }
public ActionResult OTDetails() { OTRegistration obj = new OTRegistration(); DBConnection cn = new DBConnection(); obj.CMD = "View"; obj.hid = Convert.ToInt32(Session["hospital"].ToString()); obj.patientid = Convert.ToInt32(Session["patientid"].ToString()); string xml = Common.ToXML(obj); DataSet dataset = cn.ExecuteProcedure("sp_otregistration", xml); return(View(dataset)); }
public ViewResult OTRegistrationUpdate(int regid) { OTRegistration obj = new OTRegistration(); if (regid > 0) { obj.CMD = "Update"; obj = obj.GetSingleOT(regid, Convert.ToInt32(Session["hospital"].ToString())); obj.GetMultipleDoctor(); obj.GetMultipleNurse(); } return(View("OTRegistration", obj)); }
public ActionResult OTRegistration(OTRegistration obj, string SubmitBtn) { obj.CMD = SubmitBtn == "Save" ? "Save" : SubmitBtn == "Update" ? "Update" : "Delete"; obj.hid = Convert.ToInt32(Session["hospital"].ToString()); switch (obj.CMD) { case "Save": obj.hid = Convert.ToInt32(Session["hospital"].ToString()); string[] str = obj.PerformAction(); ViewBag.msg = str[1]; string[] arr = new string[2] { "success", str[1] }; ViewBag.msgarr = arr; obj.GetMultipleDoctor(); obj.GetMultipleNurse(); return(View("OTRegistration", obj)); case "Update": string[] str1 = obj.PerformAction(); ViewBag.msg = str1[2]; string[] arrup = new string[2] { "success", str1[2] }; ViewBag.msgarr = arrup; obj.GetMultipleDoctor(); obj.GetMultipleNurse(); return(View("OTRegistration", obj)); case "Delete": string[] str2 = obj.PerformAction(); ViewBag.msg = str2[3]; string[] arrdel = new string[2] { "success", str2[3] }; ViewBag.msgarr = arrdel; obj.GetMultipleDoctor(); obj.GetMultipleNurse(); return(View("OTRegistration", obj)); default: return(View(obj)); } }