private void btnDatPhong_Click(object sender, EventArgs e) { frmPhieuThuePhong.room = txtMaPhong.Text; frmPhieuThuePhong.roomtype = txtLoaiPhong.Text; UserControl.frmPhieuThuePhong tp = new frmPhieuThuePhong(); tp.ShowDialog(); lvPhong.Enabled = false; ThietLapTextBox(); btnDatPhong.Enabled = false; }
private void btnDatPhong_Click(object sender, EventArgs e) { frmPhieuThuePhong.room = gvPhong.GetRowCellValue(gvPhong.FocusedRowHandle, gvPhong.Columns["MaPhong"]).ToString(); frmPhieuThuePhong.roomtype = gvPhong.GetRowCellValue(gvPhong.FocusedRowHandle, gvPhong.Columns["TenLoaiPhong"]).ToString(); frmPhieuThuePhong frmRentRoom = new frmPhieuThuePhong(); frmRentRoom.Show(); gcDanhSachPhong.Enabled = false; btnDatPhong.Enabled = false; }