protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { try { GridView gv = (GridView)sender; GridViewRow row = GridView1.Rows[e.RowIndex]; string sID = gv.DataKeys[e.RowIndex]["MaHD"].ToString(); DDatHangDTO ddhDTO = new DDatHangDTO(); ddhDTO.MaHD = int.Parse(sID); if (gv.Rows.Count == 1) { CurrentPage--; } DDatHangBUS.XoaDonDatHang(ddhDTO); BindItemsList(); } catch (Exception ex) { } }