private void btThuePhongOK_Click(object sender, EventArgs e) { thuephongBLL tpBLL = new thuephongBLL(); tpBLL.them_thuephong(int.Parse(txtmakhtp.Text.Trim()), dtTuNgaytp.Value, int.Parse(txtPhongtp.Text.Trim())); MessageBox.Show("thuê phòng thàng công", "Thông báo"); }
public void Load_PhongTrong() { thuephongBLL tpBLL = new thuephongBLL(); DataTable dt = tpBLL.hienthi_maphongtrong(); for (int i = 0; i < dt.Rows.Count; i++) { comboBox1.Items.Add(dt.Rows[i][0]); } }
private void TPTinhTien_Click(object sender, EventArgs e) { thanhtoan(); // thuephongBLL tpBLL = new thuephongBLL(); // tpBLL.tinhtien(dttpngayketthucthue.Value, float.Parse(txttongtien.Text.Trim()),int.Parse(txtmathuephong.Text.Trim()),int.Parse(txtTPPhong.Text.Trim())); hienthitraphong(); MessageBox.Show("Số tiền phải trả là : " + txttongtien.Text, "Tổng tiền"); thuephongBLL tpBLL = new thuephongBLL(); ////DialogResult luu = MessageBox.Show("Bạn chắc chắn xóa??", "Thông báo thêm mới", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); tpBLL.xoa_thuephong(int.Parse(txtTPPhong.Text)); hienthitraphong(); }
private void hienthitraphong() { thuephongBLL tpBLL = new thuephongBLL(); dgtraphong.DataSource = tpBLL.hienthi_thuetheophong(); }