/// <summary> /// 填充 DropDownList /// </summary> public static void DropDownListDataBind(DBDropDownList dropdonlist, string sql, bool addSpaceItem) { if (sql != string.Empty) { DataTable dt = WebCommon.GetDB_WJSJZX().ExeSqlForDataTable(sql, null, "t"); UIUtility.ListControlDataBind(dropdonlist, dt, addSpaceItem); } }
/// <summary> /// 填充 DropDownList /// </summary> public static void DropDownListDataBind(DBDropDownList dropdonlist, bool addSpaceItem) { string sql = string.Empty; switch (dropdonlist.ToolTip) { /*2015-3-31 李贯涛 综合监管招标方式*/ case "zbfs": //招标方式 sql = "select CodeInfo,Code from tbTenderTypeDic "; break; case "PrjType": sql = "select CodeInfo,Code from tbPrjTypeDic "; break; case "Lxjb": sql = "select CodeInfo,Code from tbLxjbDic "; break; case "PrjProperty": sql = "select CodeInfo,Code from tbPrjPropertyDic "; break; case "PrjStructureType": sql = "select CodeInfo,Code from tbPrjStructureTypeDic "; break; case "TenderClass": sql = "select CodeInfo,Code from tbTenderClassDic "; break; case "TenderType": sql = "select CodeInfo,Code from tbTenderTypeDic "; break; case "ContractType": sql = "select CodeInfo,Code from tbContractTypeDic order by OrderID "; break; case "WorkDuty": sql = "select CodeInfo,Code from tbWorkDutyDic "; break; case "IDCardType": sql = "select CodeInfo,Code from tbIDCardTypeDic "; break; case "SpecialtyType": sql = "select CodeInfo,Code from tbSpecialtyTypeDic "; break; case "Xzqdm": sql = "select CodeInfo,Code from tbXzqdmDic where parentCode='320200' "; break; case "ApprovalLevel": sql = "select CodeInfo,Code from tbLxjbDic "; break; case "xmsd": sql = "select CodeInfo,Code from tbXzqdmDic where parentCode='320200' "; break; } if (sql != string.Empty) { DataTable dt = WebCommon.GetDB_WJSJZX().ExeSqlForDataTable(sql, null, "t"); UIUtility.ListControlDataBind(dropdonlist, dt, addSpaceItem); } }
/// <summary> /// 填充 DropDownList /// </summary> public static void DropDownListDataBind(DBDropDownList dropdonlist, DataTable dt, bool addSpaceItem) { //UIvsData.DropDownListDataBind(dropdonlist, dt, addSpaceItem);\ UIUtility.ListControlDataBind(dropdonlist, dt, addSpaceItem); }
/// <summary> /// 填充 DropDownList /// </summary> public static void DropDownListDataBind(DBDropDownList dropdonlist, bool addSpaceItem) { string sql = string.Empty; switch (dropdonlist.ToolTip) { case "zbfs": //招标方式 sql = "select CodeInfo,Code from tbTenderTypeDic "; break; case "PrjType": sql = "select CodeInfo,Code from tbPrjTypeDic "; break; case "Lxjb": sql = "select CodeInfo,Code from tbLxjbDic "; break; case "PrjProperty": sql = "select CodeInfo,Code from tbPrjPropertyDic "; break; case "PrjStructureType": sql = "select CodeInfo,Code from tbPrjStructureTypeDic "; break; case "TenderClass": sql = "select CodeInfo,Code from tbTenderClassDic "; break; case "TenderType": sql = "select CodeInfo,Code from tbTenderTypeDic "; break; case "ContractType": sql = "select CodeInfo,Code from tbContractTypeDic "; break; case "WorkDuty": sql = "select CodeInfo,Code from tbWorkDutyDic "; break; case "IDCardType": sql = "select CodeInfo,Code from tbIDCardTypeDic "; break; case "SpecialtyType": sql = "select CodeInfo,Code from tbSpecialtyTypeDic "; break; case "Xzqdm": sql = "select CodeInfo,Code from tbXzqdmDic where parentCode='320200' "; break; case "ApprovalLevel": sql = "select CodeInfo,Code from tbLxjbDic "; break; case "KCSJContractType": sql = "select CodeInfo,Code from tbContractTypeDic where Code='100' or Code='200' "; break; case "SGJLContractType": sql = "select CodeInfo,Code from tbContractTypeDic where Code<>'100' and Code<>'200' "; break; } if (sql != string.Empty) { GcxmBLL bll = new GcxmBLL(new AppUser()); DataTable dt = bll.GetTable(sql, null, "t"); UIUtility.ListControlDataBind(dropdonlist, dt, addSpaceItem); } }