public override ActionResult AjaxList()
        {
            int    start  = 0; // 分页起始条目数
            int    length = 0; // 分页每页分页数
            string strSql = "Status=1";

            start  = Convert.ToInt32(Request.Params["start"]);
            length = Convert.ToInt32(Request.Params["length"]);

            StringBuilder sb = new StringBuilder("", 100);

            if (!string.IsNullOrEmpty(Request.Params["DecisionRule"]))    //返回值是空,非空执行
            {
                strSql += " and DecisionRule like'%" + Request.Params["DecisionRule"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request.Params["Name"]))
            {
                strSql += " and Name like'%" + Request.Params["Name"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request.Params["Sex"]))
            {
                strSql += " and Sex ='" + Request.Params["Sex"] + "'";
            }
            if (!string.IsNullOrEmpty(Request.Params["starDescriptiont"]))
            {
                strSql += " and Description like'%" + Request.Params["stDescriptionart"] + "%'";
            }
            if (!string.IsNullOrEmpty(Request.Params["EvalGuidId"]))
            {
                strSql += " and EvalGuidId='" + Request.Params["EvalGuidId"] + "'";
            }

            sb.Append(strSql);

            List <HTNResp.Model.DiagnoseList> list = bll.DataTableToList(bll.GetListByPage(strSql, "", start + 1, start + length).Tables[0]);
            int total       = bll.GetRecordCount("Status=1");
            int totalFilter = bll.GetRecordCount(strSql);

            BLL.EvalGuid bllEvalGuid = new BLL.EvalGuid();
            return(this.Json(new
            {
                result = 1,
                data = new
                {
                    draw = Request.Params["draw"],
                    recordsTotal = total,
                    recordsFiltered = totalFilter,
                    data = list.Select(o => new
                    {
                        ID = o.ID,
                        DecisionRule = o.DecisionRule,
                        Name = o.Name,
                        Sex = o.Sex,
                        Description = o.Description,
                        EvalGuidId = o.EvalGuidId,
                        EvalGuid = bllEvalGuid.GetModel(o.EvalGuidId.Value).GuidName,
                    })
                }
            }));
        }
        public override ActionResult AjaxList()
        {
            int start  = 0; // 分页起始条目数
            int length = 0; // 分页每页分页数

            start  = Convert.ToInt32(Request.Params["start"]);
            length = Convert.ToInt32(Request.Params["length"]);

            // todo: 读取数据库 获取分页数据
            string strSql = " Status=1 ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (!string.IsNullOrEmpty(Request.Params["DecisionRule"]))
            {
                sb.Append(" and DecisionRule like '%" + Request.Params["DecisionRule"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Contents"]))
            {
                sb.Append(" and Contents like '%" + Request.Params["Contents"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["SymptomName"]))
            {
                sb.Append(" and SymptomName like '%" + Request.Params["SymptomName"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["EvalGuidId"]))
            {
                sb.Append(" and EvalGuidId='" + Request.Params["EvalGuidId"] + "'");
            }

            strSql += sb.ToString();

            List <HTNResp.Model.SpecialPatientProcess> list = bll.DataTableToList(bll.GetListByPage(strSql, "", start + 1, start + length).Tables[0]);
            int total       = bll.GetRecordCount("");
            int totalFilter = bll.GetRecordCount(strSql);

            BLL.EvalGuid bllEvalGrid = new BLL.EvalGuid();

            return(this.Json(new
            {
                result = 1,
                data = new
                {
                    draw = Request.Params["draw"],
                    recordsTotal = total,
                    recordsFiltered = totalFilter,
                    data = list.Select(o => new
                    {
                        ID = o.ID,
                        DecisionRule = o.DecisionRule,
                        SymptomName = o.SymptomName,
                        Contents = o.Contents,
                        EvalGuidId = o.EvalGuidId,
                        EvalGuid = bllEvalGrid.GetModel(o.EvalGuidId.Value).GuidName,
                    })
                }
            }));
        }
        public override ActionResult AjaxList()
        {
            int start  = 0; // 分页起始条目数
            int length = 0; // 分页每页分页数

            start  = Convert.ToInt32(Request.Params["start"]);
            length = Convert.ToInt32(Request.Params["length"]);

            // todo: 读取数据库 获取分页数据
            string strSql = " Status=1 ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (!string.IsNullOrEmpty(Request.Params["ProjectName"]))
            {
                sb.Append(" and ProjectName like '%" + Request.Params["ProjectName"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["DangerousGroup"]))
            {
                sb.Append(" and DangerousGroup='" + Request.Params["DangerousGroup"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["DecisionRule"]))
            {
                sb.Append(" and DecisionRule like '%" + Request.Params["DecisionRule"] + "%' ");
            }

            if (!string.IsNullOrEmpty(Request.Params["AdaptScope"]))
            {
                sb.Append(" and AdaptScope like '%" + Request.Params["AdaptScope"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Measure"]))
            {
                sb.Append(" and Measure like '%" + Request.Params["Measure"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Aim"]))
            {
                sb.Append(" and Aim like '%" + Request.Params["Aim"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["EvalGuidId"]))
            {
                sb.Append(" and EvalGuidId='" + Request.Params["EvalGuidId"] + "'");
            }

            strSql += sb.ToString();

            List <HTNResp.Model.PrevensionProject> list = bll.DataTableToList(bll.GetListByPage(strSql, "", start + 1, start + length).Tables[0]);
            int total       = bll.GetRecordCount("Status=1");
            int totalFilter = bll.GetRecordCount(strSql);

            BLL.EvalGuid bllEvalGrid = new BLL.EvalGuid();

            // 返回JSON结果
            // JSON统一格式为 { result = 1, data = new { } } 或 { result = 0, msg = "" }
            return(this.Json(new
            {
                result = 1,
                data = new
                {
                    draw = Request.Params["draw"],
                    recordsTotal = total,
                    recordsFiltered = totalFilter,
                    data = list.Select(o => new
                    {
                        ID = o.ID,
                        ProjectName = o.ProjectName,
                        DangerousGroup = o.DangerousGroup,
                        DecisionRule = o.DecisionRule,
                        AdaptScope = o.AdaptScope,
                        Measure = o.Measure,
                        Aim = o.Aim,
                        EvalGuidId = o.EvalGuidId,
                        EvalGuid = bllEvalGrid.GetModel(o.EvalGuidId.Value).GuidName,
                    })
                }
            }));
        }
示例#4
0
        public override ActionResult AjaxList()
        {
            int start  = 0; // 分页起始条目数
            int length = 0; // 分页每页分页数

            start  = Convert.ToInt32(Request.Params["start"]);
            length = Convert.ToInt32(Request.Params["length"]);

            string strSql = " 1=1 ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            //strSql = "GroupName'" + GroupName + "' and GroupNameDetail'" + GroupNameDetail + "'";
            if (!string.IsNullOrEmpty(Request.Params["GroupName"]))
            {
                sb.Append(" and GroupName='" + Request.Params["GroupName"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["GroupNameDetail"]))
            {
                sb.Append(" and GroupNameDetail='" + Request.Params["GroupNameDetail"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Symptom"]))
            {
                sb.Append(" and Symptom like '%" + Request.Params["Symptom"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["SymptomType"]))
            {
                sb.Append(" and SymptomType='" + Request.Params["SymptomType"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["EvalGuidId"]))
            {
                sb.Append(" and EvalGuidId='" + Request.Params["EvalGuidId"] + "'");
            }
            strSql += sb.ToString();

            List <HTNResp.Model.AdaptMedicineUse> list = bll.DataTableToList(bll.GetListByPage(strSql, " ", start + 1, start + length).Tables[0]);
            int total       = bll.GetRecordCount("");       //总页数
            int totalFilter = bll.GetRecordCount(strSql);   //查到的页数

            BLL.EvalGuid bllEvalGrid = new BLL.EvalGuid();
            // 返回JSON结果,JSON统一格式为 { result = 1, data = new { } } 或 { result = 0, msg = "" }
            return(this.Json(new
            {
                result = 1,
                data = new
                {
                    draw = Request.Params["draw"],
                    recordsTotal = total,
                    recordsFiltered = totalFilter,
                    data = list.Select(o => new
                    {
                        ID = o.ID,
                        GroupName = o.GroupName,
                        GroupNameDetail = o.GroupNameDetail,
                        Symptom = o.Symptom,
                        SymptomType = o.SymptomType,
                        EvalGuidId = o.EvalGuidId,
                        EvalGuid = bllEvalGrid.GetModel(o.EvalGuidId.Value).GuidName,
                    })
                }
            }));
        }
示例#5
0
        public override ActionResult AjaxList()
        {
            int start  = 0; // 分页起始条目数
            int length = 0; // 分页每页分页数

            start  = Convert.ToInt32(Request.Params["start"]);
            length = Convert.ToInt32(Request.Params["length"]);

            // todo: 读取数据库 获取分页数据
            string strSql = " Status=1 ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (!string.IsNullOrEmpty(Request.Params["DecisionRule"]))
            {
                sb.Append(" and DecisionRule like '%" + Request.Params["DecisionRule"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Contents"]))
            {
                sb.Append(" and Contents like '%" + Request.Params["Contents"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Sex"]))
            {
                sb.Append(" and Sex='" + Request.Params["Sex"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Sort"]))
            {
                sb.Append(" and Sort='" + Request.Params["Sort"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Separator"]))
            {
                sb.Append(" and Separator='" + Request.Params["Separator"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["TypeName"]))
            {
                sb.Append(" and TypeName='" + Request.Params["TypeName"] + "' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["Remark"]))
            {
                sb.Append(" and Remark like '%" + Request.Params["Remark"] + "%' ");
            }
            if (!string.IsNullOrEmpty(Request.Params["EvalGuidId"]))
            {
                sb.Append(" and EvalGuidId='" + Request.Params["EvalGuidId"] + "'");
            }

            strSql += sb.ToString();

            List <HTNResp.Model.EvaluationContent> list = bll.DataTableToList(bll.GetListByPage(strSql, "Sort", start + 1, start + length).Tables[0]);
            int total       = bll.GetRecordCount("Status=1");
            int totalFilter = bll.GetRecordCount(strSql);

            BLL.EvalGuid bllEvalGrid = new BLL.EvalGuid();

            // 返回JSON结果
            // JSON统一格式为 { result = 1, data = new { } } 或 { result = 0, msg = "" }
            return(this.Json(new
            {
                result = 1,
                data = new
                {
                    draw = Request.Params["draw"],
                    recordsTotal = total,
                    recordsFiltered = totalFilter,
                    data = list.Select(o => new
                    {
                        ID = o.ID,
                        DecisionRule = o.DecisionRule,
                        Contents = o.Contents,
                        Sex = o.Sex,
                        Sort = o.Sort,
                        Separator = o.Separator,
                        TypeName = o.TypeName,
                        Remark = o.Remark,
                        EvalGuidId = o.EvalGuidId,
                        EvalGuid = bllEvalGrid.GetModel(o.EvalGuidId.Value).GuidName,
                    })
                }
            }));
        }