예제 #1
0
        public JsonResult AddApplyForAgain(string emsNumber)
        {
            string result    = string.Empty;
            string msg       = string.Empty;
            bool   isSuccess = false;

            if (!string.IsNullOrEmpty(emsNumber))
            {
                ApplyProvider db = new ApplyProvider();
                //检查是否可以提交续领申请用药(即EMS号)1是可以提交。0 是不可以提交
                db.CheckApplyIsSubmit(Session[USRID].ToString(), emsNumber, out result, out msg);
                if (result == "1")
                {
                    isSuccess = db.UpdatePatientAgainInfo(Session[USRID].ToString(), emsNumber);
                }
            }

            return(Json(new { IsSuccess = isSuccess, errormsg = msg }, "text/html", JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        //首次提交
        public JsonResult AddApplyFor(string data)
        {
            bool   result   = false;
            string errormsg = string.Empty;

            if (!string.IsNullOrEmpty(data))
            {
                UsersModel    patient = JsonConvert.DeserializeObject <UsersModel>(data);
                ApplyProvider db      = new ApplyProvider();
                //首次申请用药提交前检查是否已经提交过。
                if (!db.CheckApplyIsExist(Session[USRID].ToString()))
                {
                    result = db.UpdatePatientOtherInfo(patient);
                    //更新完首次申请信息,然后提交一条申请
                    db.UpdatePatientAgainInfo(Session[USRID].ToString(), patient.EMSNumber);
                }
                else
                {
                    errormsg = "您已经提交过首次申请用药!";
                }
            }

            return(Json(new { IsSuccess = result, errormsg = errormsg }, "text/html", JsonRequestBehavior.AllowGet));
        }