日期:2014-05-18 浏览次数:21015 次
foreach (DataRow dr in dtPage.Rows)
{
string displayName = dr["displayname"].ToString();
Label lbl = new Label();
lbl.Text = displayName;
//lbl.Location = new Point(400, 400);
CheckBox chb = new CheckBox();
if (dt.Select("displayname='" + displayName + "'").Count() > 0)
{
chb.Checked = true;
}
else
{
chb.Checked = false;
}
//chb.Location = new Point(500, 500);
this.Controls.Add(lbl);
this.Controls.Add(chb);
}
lbl.Dock = DockStyle.Top;