protected void bntDel_Click(object sender, EventArgs e) { foreach (string item in HttpContext.Current.Request.Form) { if (item.Substring(0, 9) == "chbDelete") { int intID = int.Parse(this.objComm.SafeString(item.Substring(9, item.Length - 9))); try { HistoryLoginDAO.Delete(intID); this.objComm.wr( "<script language='javascript'>alert('Xóa thành công!');location.href='/AppAdmin/AdminHistoryLog/HistoryLogin.aspx';</script>"); } catch (Exception ex) { throw new Exception(ex.Message); } } } }
private void ListLogLogin() { this.GrvLogLogịn.DataSource = HistoryLoginDAO.getAllHistoryLogin(); this.GrvLogLogịn.DataBind(); }