
public void DropDownListBinding(DropDownList DDList, string sql, string strText, string strField, string str_qxz) { DataTable dt = MDGL.DBUtility.SQLServerHelper.GetDataTable(CommandType.Text, sql); DDList.DataSource = dt; DDList.DataValueField = strField; DDList.DataTextField = strText; DDList.DataBind(); ListItem NewItem = new ListItem(); NewItem.Value = ""; NewItem.Text = str_qxz; DDList.Items.Insert(0, NewItem); } public void DropDownListBinding(DropDownList DDList, string sql, string strText, string strField) { DataTable dt = MDGL.DBUtility.SQLServerHelper.GetDataTable(CommandType.Text, sql); DDList.DataSource = dt; DDList.DataValueField = strField; DDList.DataTextField = strText; DDList.DataBind(); }