コード例 #1
0
        public ActionResult DiseaseDisable()
        {
            int             id      = Convert.ToInt32(Request.Form["id"]);
            bool            disable = Convert.ToBoolean(Request.Form["disable"]);
            M_ZCaseTemplate model   = new M_ZCaseTemplate();

            model.IsActive = disable;
            model.ID       = id;
            int    res   = new M_ZCaseTemplateBLL().Modify(model, "IsActive");
            string tInfo = "";
            string finfo = "";

            if (disable)
            {
                tInfo = "设置“<span style='color:darkgreen'>有效</span>”成功!";
                finfo = "设置“<span style='color:darkgreen'>有效</span>”失败!";
            }
            else
            {
                tInfo = "设置“<span style='color:red'>无效</span>”成功!";
                finfo = "设置“<span style='color:red'>无效</span>”失败!";
            }
            if (res > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, tInfo, null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, finfo, null, null));
            }
        }
コード例 #2
0
        public ActionResult DiseaseEdit()
        {
            string          DetailInfo = Request.Form["Info"].ToString();
            M_ZCaseTemplate model      = JsonHelper.GetJsonInfoBy <M_ZCaseTemplate>(DetailInfo);

            int res = new M_ZCaseTemplateBLL().Modify(model, "ID", "Name", "AlarmReason", "HistoryOfPresentIllness", "SN", "IsActive");

            if (res > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, "修改成功!", null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, "修改失败", null, null));
            }
        }
コード例 #3
0
        public ActionResult DiseaseAdd()
        {
            string DetailInfo           = Request.Form["Info"].ToString();
            List <M_ZCaseTemplate> list = new M_ZCaseTemplateBLL().GetMaxID();

            M_ZCaseTemplate info = JsonHelper.GetJsonInfoBy <M_ZCaseTemplate>(DetailInfo);

            info.ID = list[0].ID + 1;
            int res = new M_ZCaseTemplateBLL().Add(info);

            if (res > 0)
            {
                return(this.JsonResult(Utility.E_JsonResult.OK, "保存成功!", null, null));
            }
            else
            {
                return(this.JsonResult(Utility.E_JsonResult.Error, "保存失败", null, null));
            }
        }