日期:2014-05-17 浏览次数:20440 次
AccountInfoBLL bll = new AccountInfoBLL();
DataTable dt= bll.GetAccountById(id);
DataTable sdt = bll.BindStageDropDownList();
for (int i = 0; i < sdt.Rows.Count; i++)
{
}
AccountInfoBLL bll = new AccountInfoBLL();
DataTable dt= bll.GetAccountById(id);
DataTable sdt = bll.BindStageDropDownList();
for (int i = 0; i < sdt.Rows.Count; i++)
{
for(int j = 0; j < sdt.Rows.Count; j++)
if(dt.Rows[i]["Type"].ToString()==sdt.Rows[i]["Type"])
}
------解决方案--------------------
for (int i = 0; i < sdt.Rows.Count; i++)
{
for (int j = 0; j < dt.Rows.Count; j++)
{
//这里比较吧,比如
if (dt.Rows[j].Cells[0].Value.ToString() == sdt.Rows[i].Cells[0].Value.ToString())
{
//选中
}
}
}