Пример #1
0
        public ActionResult PresentingComplentsMaster(PresentingComplentsMaster obj, string SubmitBtn)
        {
            obj.CMD = SubmitBtn == "Save" ? "Save" : SubmitBtn == "Update" ? "Update" : "Delete";
            switch (obj.CMD)
            {
            case "Save":
                obj.hid = Convert.ToInt32(Session["hospital"].ToString());
                string[] str = obj.PerformAction();
                ViewBag.msg = str[1];
                return(RedirectToAction("PresentingComplentsDetails"));

            case "Update":
                string[] str1 = obj.PerformAction();
                ViewBag.msg = str1[2];
                return(RedirectToAction("PresentingComplentsDetails"));

            case "Delete":
                string[] str2 = obj.PerformAction();
                ViewBag.msg = str2[3];
                return(RedirectToAction("PresentingComplentsDetails"));

            default:
                return(View(obj));
            }
        }
Пример #2
0
 public ActionResult PresentingComplentsMasterUpdate(PresentingComplentsMaster obj, string SubmitBtn)
 {
     PresentingComplentsMaster(obj, SubmitBtn);
     if (SubmitBtn == "Delete")
     {
         return(Redirect("~/Treatment/PresentingComplentsMaster"));
     }
     return(View("PresentingComplentsMaster", obj));
 }
Пример #3
0
        public ViewResult PresentingComplentsDetails(PresentingComplentsMaster obj, string cmd)
        {
            DBConnection cn = new DBConnection();

            obj.CMD = "View";
            obj.hid = Convert.ToInt32(Session["hospital"].ToString());
            string  xml     = Common.ToXML(obj);
            DataSet dataset = cn.ExecuteProcedure("SP_Complent", xml);

            return(View(dataset));
        }
Пример #4
0
        public ViewResult PresentingComplentsMasterUpdate(int hid, int complentid)
        {
            PresentingComplentsMaster obj = new PresentingComplentsMaster();

            if (complentid > 0)
            {
                obj.CMD        = "Update";
                obj.complentid = complentid;
                obj.hid        = hid;
                obj            = obj.GetSingleComplent(complentid);
            }
            return(View("PresentingComplentsMaster", obj));
        }