关于传参
现在我有个dropdownlist控件,我想通过传参的方法整合一下,但是以前没有接触过这个,希望大家能帮我看下哦
下面是dropdownlist控件数据绑定
protected void ddlGroupIDBind()
{
string sqlSel = "select GroupID,G_CName from sys_Group where G_ParentID !=0 order by GroupID ";
SqlConnection con = new SqlConnection(strCon); ;
con.Open();
SqlDataAdapter sda = new SqlDataAdapter(sqlSel, con);
DataSet ds = new DataSet();
sda.Fill(ds);
ddlGroupID.DataSource = ds.Tables[0].DefaultView;
ddlGroupID.DataTextField = "G_CName";
ddlGroupID.DataValueField = "GroupID";
ddlGroupID.DataBind();
}
下面是我写的传参
#region sys_UserPermission传参
public static string GetUserPermissionTable(string strTableUserPermission, int intID)
{
string dataset = "";
string sql = "select GroupID,G_CName from sys_Group where G_ParentID !=0 order by GroupID ";
using (SqlDataReader dr = DBhelper.ExecuteDataReader(System.Data.CommandType.Text, sql, null))
{
if (dr.HasRows)
{
while (dr.Read())
{