Пример #1
0
        public WebApiResult <List <combotree> > GetBuildList(string Property)
        {
            List <D_Build>   Data;
            List <combotree> tree = new List <combotree>();

            if (Property.IsNullOrEmpty())
            {
                IQueryable <Sys_DataDict> DictionaryList = new Sys_DataDictBLL().GetList(p => p.DataDict_ParentCode == "47");
                Data = new D_BuildBLL().GetAll().ToList();
                DictionaryList.ForEach(p =>
                {
                    tree.Add(new combotree {
                        id = p.DataDict_Code, text = p.DataDict_Name, attributes = "", children = children(p.DataDict_Code, Data)
                    });
                });
            }
            else
            {
                Sys_DataDict DictionaryInfo = new Sys_DataDictBLL().Get(p => p.DataDict_Code == Property);
                Data = new D_BuildBLL().GetList(p => p.Property == Property).ToList();
                tree.Add(new combotree {
                    id = Property, text = DictionaryInfo.DataDict_Name, attributes = "", children = children("", Data)
                });
            }
            var result = new WebApiPagingResult <List <combotree> >
            {
                Data = tree
            };

            return(result);
        }
Пример #2
0
        public List <combotree> GetDictionaryTree(string TreeCode)
        {
            List <combotree> tree = new List <combotree>()
            {
                new combotree {
                    id = "", text = Constant.DrpChoiceName
                }
            };
            List <Sys_DataDict> DataDictList    = new Sys_DataDictBLL().GetList(p => p.DataDict_ParentCode.StartsWith(TreeCode) && p.DataDict_IsDel == false).OrderBy(p => p.DataDict_Sequence).ToList();
            List <Sys_DataDict> OneDataDictList = DataDictList.Where(p => p.DataDict_ParentCode == TreeCode).ToList();

            OneDataDictList.ForEach(item =>
            {
                tree.Add(new combotree
                {
                    id       = item.DataDict_Code,
                    text     = item.DataDict_Name,
                    state    = "open",
                    children = children(item.DataDict_Code, DataDictList)
                });
            });

            //var result = new WebApiPagingResult<List<combotree>>
            //{
            //    Data = tree
            //};

            return(tree);
        }
Пример #3
0
        /// <summary>
        /// 绑定查询条件下拉框
        /// </summary>
        public void BindDDL()
        {
            Sys_DataDictBLL balDataDict = new Sys_DataDictBLL();

            listDataDict = balDataDict.FindWhere(p => p.DataDict_ParentCode == "44").OrderBy(p => p.DataDict_Sequence).ToList();
            listDataDict.Insert(0, new Sys_DataDict {
                DataDict_Name = "--全部--", DataDict_Code = ""
            });
        }
        /// <summary>
        /// 绑定下拉框
        /// </summary>
        private void BindDDL()
        {
            Sys_DataDictBLL bllDataDict = new Sys_DataDictBLL();
            Common_BLL      bllComm     = new Common_BLL();
            //类型
            List <Sys_DataDict> listDealersInfo_Type = bllDataDict.FindWhere(p => p.DataDict_Code == "4504" || p.DataDict_Code == "4505").OrderBy(p => p.DataDict_Sequence).ToList();

            listDealersInfo_Type.Insert(0, new Sys_DataDict {
                DataDict_Name = "==请选择==", DataDict_Code = ""
            });
            this.ddlDealersInfo_Type.DataSource     = listDealersInfo_Type;
            this.ddlDealersInfo_Type.DataTextField  = "DataDict_Name";
            this.ddlDealersInfo_Type.DataValueField = "DataDict_Code";
            this.ddlDealersInfo_Type.DataBind();
            //合作类型
            List <Sys_DataDict> listDealersInfo_CooperativeType = bllDataDict.FindWhere(p => p.DataDict_ParentCode == "58").OrderBy(p => p.DataDict_Sequence).ToList();

            listDealersInfo_CooperativeType.Insert(0, new Sys_DataDict {
                DataDict_Name = "==请选择==", DataDict_Code = ""
            });
            this.ddlDealersInfo_CooperativeType.DataSource     = listDealersInfo_CooperativeType;
            this.ddlDealersInfo_CooperativeType.DataTextField  = "DataDict_Name";
            this.ddlDealersInfo_CooperativeType.DataValueField = "DataDict_Code";
            this.ddlDealersInfo_CooperativeType.DataBind();
            //所属区域1
            DataTable listDealersInfo_Area1 = bllComm.GetDataBySQL("SELECT AreaDistribution_ID,AreaDistribution_Name FROM dbo.Business_AreaDistribution GROUP BY AreaDistribution_ID,AreaDistribution_Name");
            DataRow   newRow;

            newRow = listDealersInfo_Area1.NewRow();
            newRow["AreaDistribution_ID"]   = "";
            newRow["AreaDistribution_Name"] = Constant.DrpChoiceName;
            listDealersInfo_Area1.Rows.InsertAt(newRow, 0);
            this.ddlDealersInfo_Area1.DataSource     = listDealersInfo_Area1;
            this.ddlDealersInfo_Area1.DataTextField  = "AreaDistribution_Name";
            this.ddlDealersInfo_Area1.DataValueField = "AreaDistribution_ID";
            this.ddlDealersInfo_Area1.DataBind();

            List <Sys_Hierarchy> HierarchyList = new List <Sys_Hierarchy>();

            HierarchyList = new Sys_HierarchyBLL().FindWhere(p => p.Hierarchy_ParentCode == "01" && p.Hierarchy_IsDel == false).OrderBy(p => p.Hierarchy_Sequence).ToList();
            HierarchyList.Insert(0, new Sys_Hierarchy {
                Hierarchy_Name = Constant.DrpChoiceName, Hierarchy_Code = ""
            });
            ddlDealersInfo_HierarchyOne.DataSource     = HierarchyList;
            ddlDealersInfo_HierarchyOne.DataTextField  = "Hierarchy_Name";
            ddlDealersInfo_HierarchyOne.DataValueField = "Hierarchy_Code";
            ddlDealersInfo_HierarchyOne.DataBind();

            HierarchyList = new Sys_HierarchyBLL().FindWhere(p => p.Hierarchy_ParentCode == "02" && p.Hierarchy_IsDel == false).OrderBy(p => p.Hierarchy_Sequence).ToList();
            HierarchyList.Insert(0, new Sys_Hierarchy {
                Hierarchy_Name = Constant.DrpChoiceName, Hierarchy_Code = ""
            });
            ddlDealersInfo_HierarchyTwo.DataSource     = HierarchyList;
            ddlDealersInfo_HierarchyTwo.DataTextField  = "Hierarchy_Name";
            ddlDealersInfo_HierarchyTwo.DataValueField = "Hierarchy_Code";
            ddlDealersInfo_HierarchyTwo.DataBind();
        }
Пример #5
0
        public void BindDDL()
        {
            Sys_DataDictBLL     balDataDict  = new Sys_DataDictBLL();
            List <Sys_DataDict> listDataDict = balDataDict.GetList(p => p.DataDict_ParentCode == "26").OrderBy(p => p.DataDict_Sequence).ToList();

            this.ddlNotice_Type.DataSource     = listDataDict;
            this.ddlNotice_Type.DataTextField  = "DataDict_Name";
            this.ddlNotice_Type.DataValueField = "DataDict_Code";
            this.ddlNotice_Type.DataBind();
        }
Пример #6
0
        public List <Sys_DataDict> GetDictionaryList(string ParentCode)
        {
            List <Sys_DataDict> DataDictList = new Sys_DataDictBLL().GetList(p => p.DataDict_ParentCode == ParentCode && p.DataDict_IsDel == false).OrderBy(p => p.DataDict_Sequence).ToList();

            DataDictList.Insert(0, new Sys_DataDict {
                DataDict_Name = Constant.DrpChoiceName, DataDict_Code = ""
            });
            //var result = new WebApiPagingResult<List<Sys_DataDict>>
            //{
            //    Data = DataDictList
            //};

            return(DataDictList);
        }
Пример #7
0
        public void BindDDL()
        {
            Sys_DataDictBLL balDataDict = new Sys_DataDictBLL();

            listDataDict = balDataDict.GetList(p => p.DataDict_ParentCode == "26").OrderBy(p => p.DataDict_Sequence).ToList();
            listDataDict.Insert(0, new Sys_DataDict {
                DataDict_Name = "--全部--", DataDict_Code = ""
            });
            //this.ddlNotice_Type.DataTextField = "DataDict_Name";
            //this.ddlNotice_Type.DataValueField = "DataDict_Code";
            //ListItem item = new ListItem();
            //item.Text = "请选择";
            //item.Value = "";
            //ddlNotice_Type.Items.Insert(0, item);
            //this.ddlNotice_Type.SelectedValue = base.RequstStr("type");
        }
Пример #8
0
        /// <summary>
        /// 绑定下拉框
        /// </summary>
        private void BindDDL()
        {
            Sys_DataDictBLL balDataDict = new Sys_DataDictBLL();
            //银行类型
            List <Sys_DataDict> listBank_Type = balDataDict.FindWhere(p => p.DataDict_ParentCode == "47").OrderBy(p => p.DataDict_Sequence).ToList();

            this.ddlBank_Type.DataSource     = listBank_Type;
            this.ddlBank_Type.DataTextField  = "DataDict_Name";
            this.ddlBank_Type.DataValueField = "DataDict_Code";
            this.ddlBank_Type.DataBind();
            //账户类型
            List <Sys_DataDict> listAccountType = balDataDict.FindWhere(p => p.DataDict_ParentCode == "48").OrderBy(p => p.DataDict_Sequence).ToList();

            this.ddlBank_AccountType.DataSource     = listAccountType;
            this.ddlBank_AccountType.DataTextField  = "DataDict_Name";
            this.ddlBank_AccountType.DataValueField = "DataDict_Code";
            this.ddlBank_AccountType.DataBind();
        }
Пример #9
0
        /// <summary>
        /// 绑定下拉框
        /// </summary>
        private void BindDDL()
        {
            Sys_DataDictBLL balDataDict = new Sys_DataDictBLL();
            //银行类型
            List <Sys_DataDict> listCompanyInfo_Type = balDataDict.FindWhere(p => p.DataDict_ParentCode == "44").OrderBy(p => p.DataDict_Sequence).ToList();

            this.ddlCompanyInfo_Type.DataSource     = listCompanyInfo_Type;
            this.ddlCompanyInfo_Type.DataTextField  = "DataDict_Name";
            this.ddlCompanyInfo_Type.DataValueField = "DataDict_Code";
            this.ddlCompanyInfo_Type.DataBind();

            Business_BankBLL BankBLL = new Business_BankBLL();
            //银行信息
            List <Business_Bank> listBusiness_Bank = BankBLL.FindWhere(p => p.Bank_Deleted == false);

            this.ddlCompanyInfo_Bank.DataSource     = listBusiness_Bank;
            this.ddlCompanyInfo_Bank.DataTextField  = "Bank_Name";
            this.ddlCompanyInfo_Bank.DataValueField = "BankID";
            this.ddlCompanyInfo_Bank.DataBind();
        }
Пример #10
0
 public void GetDataDictDDL()
 {
     if (!string.IsNullOrEmpty(Request["Code"]))
     {
         string              code         = Request["Code"].ToString().Trim();
         Sys_DataDictBLL     balDataDict  = new Sys_DataDictBLL();
         List <Sys_DataDict> listDataDict = balDataDict.GetList(p => p.DataDict_IsDel == false && p.DataDict_ParentCode == code).OrderBy(p => p.DataDict_Sequence).ToList();
         string              hashNull     = "1";
         if (!string.IsNullOrEmpty(Request["HashNull"]))
         {
             hashNull = Request["HashNull"];
         }
         if (hashNull.Equals("1"))
         {
             listDataDict.Insert(0, new Sys_DataDict {
                 DataDict_Name = "--请选择--", DataDict_Code = string.Empty
             });
         }
         Response.Write(new JavaScriptSerializer().Serialize(listDataDict));
     }
 }