private void btnXoa_Click(object sender, EventArgs e) { if (XtraMessageBox.Show("Bạn có muốn xóa loại hàng này không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { bus.Delete(Convert.ToInt32(txtID.Text)); XtraMessageBox.Show("Đã xóa thành công", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); HienThi(); KhoaDieuKhien(); } catch { } } }
private void btnXoa_Click(object sender, EventArgs e) { if (XtraMessageBox.Show("Bạn có muốn xóa thông tin này không?", "Thông Báo", MessageBoxButtons.YesNo) == DialogResult.Yes) { try { bus.Delete(txtMaLoaiHang.Text); XtraMessageBox.Show("Đã Xóa Thông Tin Thành Công"); XoaText(); KhoaDieuKhien(); HienThi(); } catch { } } }