示例#1
0
        public ActionResult EditForvitals(VitalsModel model)
        {
            VitalsProvider vp        = new VitalsProvider();
            var            staffname = model.Staff;

            if (string.IsNullOrWhiteSpace(staffname) == false)
            {
                // string str = Regex.Replace(ipValue, "[^0-9]+", string.Empty);
                string Valuenew  = staffname.Trim();
                int    BracIndex = staffname.IndexOf('{') + 1;
                int    TotalLen  = staffname.IndexOf('}') - 1;
                int    Len       = staffname.Length;
                int    toval     = Len - BracIndex;
                string value     = staffname.Substring(BracIndex, toval - 1);
                int    aa        = value.IndexOf('^') + 1;
                int    bb        = value.Length;
                int    lenth     = bb - aa;
                string id        = value.Substring(aa, lenth);
                model.Staff = id;
            }
            if (ModelState.IsValid)
            {
                vp.UpdateForVitals(model);
                model.ListVitalModels = vp.GetSelectedData((int)model.EmergencyMasterId);
            }
            return(PartialView("_IndexForVitals", model));
        }
示例#2
0
        public ActionResult DeleteForvitals(int id)
        {
            VitalsProvider vp = new VitalsProvider();

            vp.DeleteForVitals(id);
            return(RedirectToAction("IndexForVitals"));
        }
示例#3
0
        public ActionResult EditForvitals(int id)
        {
            VitalsModel    model = new VitalsModel();
            VitalsProvider vp    = new VitalsProvider();


            model = vp.GetListForvitals().Where(x => x.EmergencyVitalId == id).FirstOrDefault();
            return(PartialView("_EditForvitals", model));
        }
示例#4
0
        public ActionResult IndexForVitals(int id)
        {
            VitalsModel    model = new VitalsModel();
            VitalsProvider pro   = new VitalsProvider();

            model.ListVitalModels   = pro.GetSelectedData(id);
            model.EmergencyMasterId = id;
            return(PartialView("_IndexForVitals", model));
        }
        public ActionResult SearchStaffName(string s)
        {
            VitalsModel    model = new VitalsModel();
            VitalsProvider vp    = new VitalsProvider();
            EHMSEntities   ent   = new EHMSEntities();
            List <string>  names = new List <string>();



            List <StaffForERegisModel> templist = new List <StaffForERegisModel>();

            templist = vp.getStaffForERegisModelList(s).ToList();
            foreach (var item in templist)
            {
                //names.Add(item.EmployeeCode + "{" + item.EmployeeFullName + "}");
                names.Add("{" + item.EmployeeFullName + "^" + item.EmployeeCode + "}");
            }
            return(Json(names, JsonRequestBehavior.AllowGet));
        }