Пример #1
0
        private string GetLoaclData()
        {
            string where = string.Empty;

            //树形循环条件
            bool          direction = true;
            bool          isOpen    = false;
            string        withWhere = string.Empty;
            string        levelNum  = "";// " and level < 10 ";
            string        isLeaf    = "ISLEAF";
            XY_DZJZ_MBPZB bll       = new XY_DZJZ_MBPZB(this.Request);

            object[] values = new object[2];
            string   dwbm   = Request["dwbm"].Trim();
            string   ajlbbm = Request["ajlbbm"].Trim();

            where     = " and trim(UNITID) = :UNITID";
            values[0] = dwbm;
            where    += " and trim(caseInfoTypeID) = :caseInfoTypeID";
            values[1] = ajlbbm;
            DataSet ds       = bll.GetTreeList(where, withWhere, direction, values);
            string  treeJson = ConvertToLocalSSLBJosn(ds);

            return(treeJson);
        }
Пример #2
0
        private string ListBind()
        {
            //int pageNumber = 1; //int.Parse(Request["page"]);
            //int pageSize = int.MaxValue;// int.Parse(Request["rows"]);

            string where = string.Empty;

            //树形循环条件
            bool          direction = true;
            bool          isOpen    = false;
            string        withWhere = string.Empty;
            string        levelNum  = "";// " and level < 10 ";
            string        isLeaf    = "ISLEAF";
            XY_DZJZ_MBPZB bll       = new XY_DZJZ_MBPZB(this.Request);

            object[] values = new object[1];

            //if (UserInfo != null)
            //{
            where     = " and UNITID = :UNITID";
            values[0] = "370000";//UserInfo.DWBM;
            //}


            if (string.IsNullOrEmpty(withWhere))
            {
                withWhere = " and DossierParentMember is NULL ";
            }

            DataSet ds       = bll.GetTreeList(where, withWhere, direction, values);
            string  datetype = Request["datetype"];

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt         = ds.Tables[0];
                string    resultJson = dt.ToTreeJsonAll("DossierTypeValueMember", "DossierParentMember", "DossierTypeValueMember,DossierTypeDisplayMember", "");
                return(resultJson);
            }
            return("");
        }
Пример #3
0
        /// <summary>
        /// 绑定数据列表
        /// </summary>
        /// <returns></returns>
        private string ListBind()
        {
            //int pageNumber = 1; //int.Parse(Request["page"]);
            //int pageSize = int.MaxValue;// int.Parse(Request["rows"]);

            string where = string.Empty;

            //树形循环条件
            bool          direction = true;
            bool          isOpen    = false;
            string        withWhere = string.Empty;
            string        levelNum  = "";// " and level < 10 ";
            string        isLeaf    = "ISLEAF";
            XY_DZJZ_MBPZB bll       = new XY_DZJZ_MBPZB(this.Request);

            object[] values = new object[1];

            if (UserInfo != null)
            {
                where     = " and UNITID = :UNITID";
                values[0] = UserInfo.DWBM;
            }

            //关键字搜索
            string key = Request["key"];
            //获取父级节点
            string pid = "";

            pid = Request["pid"];
            if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(pid))
            {
                withWhere = " and (DossierTypeDisplayMember like '%" + key + "%') and DossierParentMember = '" + pid + "'";
            }
            else if (!string.IsNullOrEmpty(key))
            {
                withWhere = " and (DossierTypeDisplayMember like '%" + key + "%')";
                direction = false;
                levelNum  = "";
                isOpen    = true;
                isLeaf    = "";
            }
            else if (!string.IsNullOrEmpty(pid))
            {
                withWhere = " and DossierParentMember = '" + pid.ToString() + "'";
            }

            if (string.IsNullOrEmpty(withWhere))
            {
                withWhere = " and DossierParentMember is NULL ";
            }
            where += levelNum;


            DataSet ds       = bll.GetTreeList(where, withWhere, direction, values);
            string  datetype = Request["datetype"];

            if (ds != null && ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
            {
                DataTable dt = ds.Tables[0];
                if (!string.IsNullOrEmpty(datetype) && datetype == "tree")
                {
                    string resultJson = dt.ToTreeJsonAll("DossierTypeValueMember", "DossierParentMember", "DossierTypeDisplayMember", "");
                    return(resultJson);
                }
                dt.Columns["ICONCLS"].ColumnName = "icon";
                if (Request["type"] != null && !string.IsNullOrEmpty(Request["type"]) && Request["type"] == "t")
                {
                    return(new TreeJson(dt, "DossierTypeValueMember", "DossierTypeDisplayMember", "DossierParentMember", isLeaf, "", string.IsNullOrEmpty(pid) ? "" : pid, isOpen, true).ResultJson.ToString());
                }
                else
                {
                    return("{\"Rows\":" + new TreeJson(dt, "DossierTypeValueMember", "DossierTypeDisplayMember", "DossierParentMember", isLeaf, "", string.IsNullOrEmpty(pid) ? "" : pid, isOpen, true).ResultJson.ToString() + "}");
                }
            }
            return("");
        }