Ejemplo n.º 1
0
        public ActionResult FundusMaster(FundusMaster 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("FundusDetails"));

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

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

            default:
                return(View(obj));
            }
        }
Ejemplo n.º 2
0
 public ActionResult FundusMasterUpdate(FundusMaster obj, string SubmitBtn)
 {
     FundusMaster(obj, SubmitBtn);
     if (SubmitBtn == "Delete")
     {
         return(Redirect("~/Treatment/FundusMaster"));
     }
     return(View("FundusMaster", obj));
 }
Ejemplo n.º 3
0
        public ViewResult FundusDetails(FundusMaster 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_Fundus", xml);

            return(View(dataset));
        }
Ejemplo n.º 4
0
        public ViewResult FundusMasterUpdate(int hid, int fundusid)
        {
            FundusMaster obj = new FundusMaster();

            if (fundusid > 0)
            {
                obj.CMD      = "Update";
                obj.fundusid = fundusid;
                obj.hid      = hid;
                obj          = obj.GetSingleFundus(fundusid);
            }
            return(View("FundusMaster", obj));
        }