コード例 #1
0
 void ibtnActivateBanner_Click(object sender, ImageClickEventArgs e)
 {
     foreach (GridViewRow row in gvBanner.Rows)
     {
         if (row.RowType == DataControlRowType.DataRow)
         {
             HiddenField hdnBannerId      = (HiddenField)row.FindControl("hdnBannerId");
             CheckBox    cbSelectedBanner = (CheckBox)row.FindControl("cbSelect");
             if (hdnBannerId != null && (cbSelectedBanner != null && cbSelectedBanner.Checked))
             {
                 BLL.ActivateBanner(Convert.ToInt32(hdnBannerId.Value));
                 SetAlert(operationMessage);
             }
         }
     }
     GetAllBanners();
 }