예제 #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            BLPhongThue_Info blPt = new BLPhongThue_Info();

            blPt.CapNhatPhongThue_info1(this.txtTenPhong.Text.Trim(), this.cbxTinhTrang.Text.Trim(), ref err);
            LoadData();
            MessageBox.Show("Đã sửa xong");
        }
        private void btnThanhToan_Click(object sender, EventArgs e)
        {
            string           TinhTrang = "Off";
            BLPhongThue_Info blPt      = new BLPhongThue_Info();

            blPt.CapNhatPhongThue_info1(this.txtPhong.Text.Trim(), TinhTrang, ref err);
            BLPhongThue blPt1 = new BLPhongThue();

            blPt1.CapNhatPhongThue1(this.txtPhong.Text.Trim(), TinhTrang, ref err);

            BLDuLieu blDL = new BLDuLieu();

            blDL.ThemDuLieu(this.txtMaKH.Text.Trim(), this.txtTenKH.Text.Trim(), this.txtCMND.Text.Trim(), this.txtSDT.Text.Trim(),
                            this.txtGioiTinh.Text.Trim(), this.txtPhong.Text.Trim(), this.txtQuocTich.Text.Trim(),
                            this.dtpNgayDK.Value, this.dtpNgayDi.Value, Convert.ToInt32(this.txtTienDV.Text.Trim()), Convert.ToInt32(this.txtTienPhong.Text.Trim()), Convert.ToInt32(this.txtTongTien.Text.Trim()), ref err);
            FrmHoaDonKH fk = new FrmHoaDonKH();

            fk.ShowDialog();
        }