for循环 判断100个checkbox是否选中状态 如果选中 插入sql
foreach (CheckBox cb in this.Controls.OfType<ChechBox>().Where(x => x.Checked))
{
string s = cb.Text;
//根据此插入
}
foreach (CheckBox cb in this.Controls.OfType().Where(x => x.Checked))
{
string s = cb.Text;
//根据此插入
}
foreach (CheckBox cb in this.Controls.OfType().Where(x => x.Checked))
{
string s = cb.Text;
//根据此插入
}
确实可以实现