private void bntChiTietThuePhong_Click(object sender, EventArgs e)
 {
     if (gridKhachHang.Rows.Count != 0)
     {
         if (_loaiKH == 1)
         {
             PhieuThuePhongBUS phieuThuePhongBUS = new PhieuThuePhongBUS();
             PhieuThuePhongDTO phieuThuePhongDTO = new PhieuThuePhongDTO();
             phieuThuePhongDTO = phieuThuePhongBUS.DangO_KhachHang(int.Parse(gridKhachHang.CurrentRow.Cells[0].Value.ToString()));
             PhieuThuePhong phieuThuePhong = new PhieuThuePhong();
             PhieuThuePhong.maKH             = Convert.ToInt32(gridKhachHang.CurrentRow.Cells[0].Value.ToString());
             PhieuThuePhong.dangO            = true;
             PhieuThuePhong.maPhieuthuephong = phieuThuePhongDTO.Ma;
             phieuThuePhong.ShowDialog();
             Load();
         }
         else if (_loaiKH == 2)
         {
             DanhSachDatPhongTheoKhachHang ds = new DanhSachDatPhongTheoKhachHang();
             DanhSachDatPhongTheoKhachHang.maKH = Convert.ToInt32(gridKhachHang.CurrentRow.Cells[0].Value.ToString());
             ds.MyParent = this;
             ds.ShowDialog();
         }
     }
 }
Esempio n. 2
0
        private void Xemchitietdatphong(int maPhieuthuephong)
        {
            this.Hide();
            PhieuThuePhong phieuThuePhong = new PhieuThuePhong();

            PhieuThuePhong.maPhieuthuephong = maPhieuthuephong;
            phieuThuePhong.ShowDialog();
            this.Close();
        }