private void btnThanhToan_Click(object sender, EventArgs e) { SQLConnection.Update("PhieuDatPhong", "DaThanhToan = 1", "IDPhieuDatPhong = " + _IDPhieuDatPhong); SQLConnection.Update("Phong", "TinhTrang = 0", "IDPHONG LIKE '" + soPhongDat + "'"); SQLConnection.Update("KhachHang", "IDPhieuDatPhong = NULL", "IDKhachHang LIKE '" + _IDKhachHang + "'"); try { SQLConnection.Delete("Add_DichVu", "IDPhieuDatPhong = " + _IDPhieuDatPhong); SQLConnection.Delete("Add_MonAn", "IDPhieuDatPhong = " + _IDPhieuDatPhong); } catch { } InsertDTNgay(); CreateDTThang(); DialogResult result = MessageBox.Show("Thanh toán thành công!", "Thanh Toán", MessageBoxButtons.OK, MessageBoxIcon.Information); if (result == DialogResult.OK) { this.Close(); } }