Beispiel #1
0
        /// <summary>
        /// 获取模板
        /// </summary>
        /// <returns></returns>
        private string GetMBList()
        {
            string ajlb     = Request.Form.Get("ajlb");
            string strWhere = "";

            if (string.IsNullOrEmpty(ajlb))
            {
                if (string.IsNullOrEmpty(ajlb))
                {
                    return(ReturnString.JsonToString(Prompt.error, "参数错误", null));
                }
            }
            else
            {
                strWhere += " and ajlbbm='" + StringPlus.ReplaceSingle(ajlb) + "'";
            }

            strWhere += " AND DWBM = '" + UserInfo.DWBM + "' AND JSBM in (" + Jsbms + ") AND BMBM in (" + Bmbms + ") AND QXLX = 0";

            XY_DZJZ_MBPZB bll = new XY_DZJZ_MBPZB(this.Request);
            int           count;
            DataSet       ds = bll.GetDwAjList(out count, strWhere, "dwbm", 0, int.MaxValue, null);

            if (ds != null && ds.Tables.Count > 0)
            {
                DataTable dt = ds.Tables[0].Copy();
                dt.Columns["DOSSIERTYPEVALUEMEMBER"].ColumnName   = "id";
                dt.Columns["DOSSIERTYPEDISPLAYMEMBER"].ColumnName = "text";
                return(JsonHelper.JsonString(dt));
            }

            return(ReturnString.JsonToString(Prompt.error, "获取数据失败", null));
        }
Beispiel #2
0
        private string GetDwAjData()
        {
            EDRS.BLL.XY_DZJZ_MBPZB bll = new XY_DZJZ_MBPZB(Request);
            DataSet ds       = null;
            string  json     = "{\"Rows\":" + "[]" + ",\"Total\":" + 0 + "}";
            string  orderBy  = Request["sortName"] + " " + Request["sortOrder"];
            int     page     = Convert.ToInt32(Request["page"]);
            int     pageSize = Convert.ToInt32(Request["pagesize"]);
            string  strWhere = "";
            string  dwbm     = Request["dwbm"];
            string  caseajlb = Request["ajlb"];

            strWhere += " and trim(qxbm) in(select distinct trim(QXBM) from xt_dm_qx a join XT_QX_RYJSFP b on trim(a.jsbm) = b.jsbm and trim(a.bmbm)=b.bmbm and trim(a.dwbm)=b.dwbm and gh=:GH1 and b.dwbm=:DWBM1 and a.qxlx=0)";
            //strWhere += " and trim(ajlbbm) in ( select distinct trim(QXBM) from xt_dm_qx a join XT_QX_RYJSFP b on trim(a.jsbm) = b.jsbm and trim(a.bmbm)=b.bmbm and trim(a.dwbm)=b.dwbm and gh=:GH2 and b.dwbm=:DWBM2 and a.qxlx=1) ";
            object[] param = new object[] {
                UserInfo.GH,
                UserInfo.DWBM
                //,
                //UserInfo.GH,
                //UserInfo.DWBM
            };
            //strWhere += " and ajlbbm in (select qxbm from xt_dm_qx where DWBM = '" + UserInfo.DWBM + "' AND JSBM in (" + Jsbms + ") AND BMBM in (" + Bmbms + ") AND QXLX = 1)";
            if (!string.IsNullOrEmpty(dwbm))
            {
                string dwbms = dwbm.Replace(";", ",");
                strWhere += " and trim(qxbm) in (" + StringPlus.ReplaceSingle(dwbms) + ")";
            }
            if (!string.IsNullOrEmpty(caseajlb))
            {
                string caseajlbs = caseajlb.Replace(";", ",");
                strWhere += " and trim(ajlbbm) in (" + caseajlbs + ")";
            }
            if (string.IsNullOrEmpty(orderBy.Trim()))
            {
                orderBy = "dwbm";
            }

            try
            {
                int count = 0;
                ds = bll.GetDwAjList(out count, strWhere, orderBy, pageSize * (page - 1), pageSize * page, param);
                if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
                {
                    json = "{\"Rows\":" + ds.Tables[0].ToDatagridJson() + ",\"Total\":" + count + "}";
                }
            }
            catch (Exception ex)
            {
            }
            return(json);
        }