SqlCommand STcmd
//通過調用ExecuteReader()從數據庫中檢索行
SqlDataReader STdr
//初始化產品下拉列表框
ST_Prod
while(STdr
{
//向下拉列表框添加產品名字
ST_Prod
}
STconn
STconn
//創建查詢連鎖店信息的sql語句
string STmysql =
//創建數據庫的SqlCommand對象
SqlCommand STcmd =new SqlCommand(STmysql
//通過調用ExecuteReader()從數據庫中檢索行
SqlDataReader STdr = STcmd
//初始化連鎖分店下拉列表框
ST_Prod
while(STdr
{
//向下拉列表框添加連鎖分店名字
ST_Dep
}
STconn
}
}
else
{
Response
}
}
//實現數據綁定
public void BindGrid()
{
right
From:http://tw.wingwit.com/Article/program/net/201311/15496.html