全选反选
/// <summary>
/// 全选
/// </summary>
#region 全选
private void btnChooseAll_Click(object sender, System.EventArgs e)
{
foreach(Control obj in this.ReptCourseware.Controls)
{
CheckBox chk = (CheckBox) obj.FindControl("checkRecord");
if(chk!=null)
{
chk.Checked = true;
}
}
}
#endregion
/// <summary>
/// 反选
/// </summary>
#region 反选
private void btnReverseChoose_Click(object sender, System.EventArgs e)
{
foreach(Control obj in this.ReptCourseware.Controls)
{
CheckBox chk = (CheckBox) obj.FindControl("checkRecord");
if(chk!=null)
{
if(chk.Checked)
{
chk.Checked = false;
}
else
{
chk.Checked = true;
}
}
}
}
#endregion

浙公网安备 33010602011771号