protected void XoaGioiThieu(int maBai) { try { //xac nhan truoc khi xoa BUSGioiThieu busGioiThieu = new BUSGioiThieu(); if (busGioiThieu.Xoa(maBai) == 0) { //Thong bao Response.Redirect("GioiThieu.aspx"); } } catch { } }
protected void btnXoa_Click(object sender, EventArgs e) { try { //lay thong tin tu textbox int magioithieu = int.Parse(Request.QueryString["id"]); //xac nhan truoc khi xoa BUSGioiThieu BUSGioiThieu = new BUSGioiThieu(); if (BUSGioiThieu.Xoa(magioithieu) == 0) { //Thong bao lbThongBao.Text = "Xóa Thành Công"; lbThongBao.Visible = true; Response.Redirect("GioiThieu.aspx"); } } catch { lbThongBao.Text = "Xoa Không Thành Công"; lbThongBao.Visible = true; } }