/// <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(); }
/// <summary> /// 绑定用户类型 /// </summary> private void DdlUserTypeBind() { this.ddlUserType.DataSource = bllSys_DataDict.FindWhere("DataDict_ParentCode ='04'").OrderBy(m => m.DataDict_Sequence); //this.ddlUserType.DataSource = bllSys_DataDict.FindWhere(p => p.DataDict_ParentCode.Contains("04")).OrderBy(m => m.DataDict_Sequence); this.ddlUserType.DataTextField = "DataDict_Name"; this.ddlUserType.DataValueField = "DataDict_Code"; this.ddlUserType.DataBind(); }
/// <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 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(); }
/// <summary> /// 绑定控件信息 /// </summary> /// <param name="lc"></param> /// <param name="rootcode"></param> public void BindListControl(System.Web.UI.WebControls.ListControl lc, int rootcode) { var list = bllDataDict.FindWhere(" DataDict_ParentCode= " + rootcode + "order by DataDict_Sequence asc");; //var model = new Sys_DataDict { DataDict_Name = "-请选择-", DataDict_Code = "" }; //list.Insert(0, model); lc.DataSource = list; lc.DataTextField = "DataDict_Name"; lc.DataValueField = "DataDict_Name"; lc.DataBind(); lc.Items.Insert(0, new ListItem("-请选择-", "")); }
/// <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(); }