Beispiel #1
0
        private string GetYWLXList()
        {
            EDRS.BLL.XT_DM_YWBM bll = new EDRS.BLL.XT_DM_YWBM(this.Request);
            DataSet             ds  = bll.GetAllList();

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                dt.Columns["YWBM"].ColumnName = "id";
                dt.Columns["YWMC"].ColumnName = "text";
                return(EDRS.Common.JsonHelper.JsonString(dt));
            }
            else
            {
                return(EDRS.Common.ReturnString.JsonToString(Prompt.error, "未找到相关业务类别", null));
            }
        }
Beispiel #2
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        /// <returns></returns>
        public string ListBind()
        {
            string page = Request.Form["page"];
            string rows = Request.Form["pagesize"];
            string key  = Request.Form["key"];

            int pageNumber = int.Parse(page);
            int pageSize   = int.Parse(rows);

            string where = string.Empty;

            List <object> values = new List <object>();

            if (!string.IsNullOrEmpty(key))
            {
                where += " and YWMC like :YWMC ";
                values.Add("%" + key + "%");
            }

            EDRS.BLL.XT_DM_YWBM bll = new EDRS.BLL.XT_DM_YWBM(this.Request);

            DataSet ds = bll.GetListByPage(where + " and SFSC='N' ", " YWBM asc", (pageSize * pageNumber) - pageSize + 1, (pageSize * pageNumber), values.ToArray());

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                //数据日志
                OperateLog.AddLog(OperateLog.LogType.参数配置Web, "业务编码绑定成功", UserInfo, UserRole, this.Request);
                int       count = bll.GetRecordCount(where + " and SFSC='N' ", values.ToArray());
                DataTable dt    = (ds.Tables[0]).Copy();

                return("{\"Total\":" + count + ",\"Rows\":" + JsonHelper.JsonString(dt) + "}");
            }
            //数据日志
            OperateLog.AddLog(OperateLog.LogType.参数配置Web, "业务编码绑定列表未找到信息", UserInfo, UserRole, this.Request);
            return(ReturnString.JsonToString(Prompt.error, "未找到类别", null));
        }