protected override void BindData() { DataTable dt = new XYECOM.Business.AreaSite().GetDataTable(); this.gvlist.DataSource = dt; this.gvlist.DataBind(); }
protected void lnkDel_Click(object sender, EventArgs e) { int siteId= 0; XYECOM.Business.AreaSite BLL = new XYECOM.Business.AreaSite(); foreach (GridViewRow row in this.gvlist.Rows) { if (((CheckBox)(row.FindControl("chkExport"))).Checked == true) { siteId = Core.MyConvert.GetInt32(this.gvlist.DataKeys[row.DataItemIndex].Value.ToString()); BLL.Delete(siteId); } } BindData(); }