コード例 #1
0
        public ActionResult OTRegistration()
        {
            OTRegistration obj = new OTRegistration();

            obj.GetMultipleDoctor();
            obj.GetMultipleNurse();
            return(View(obj));
        }
コード例 #2
0
        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));
            }
        }
コード例 #3
0
        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));
        }