Exemplo n.º 1
0
        private void btnThuePhong_ItemClick(object sender, ItemClickEventArgs e)
        {
            Form frm = this.CheckExists(typeof(FormThuePhong));

            if (frm != null)
            {
                frm.Activate();
            }
            else
            {
                FormThuePhong f = new FormThuePhong();
                f.MdiParent = this;
                f.Show();
            }
        }
        private void btnThuePhong_Click(object sender, EventArgs e)
        {
            if (lblTenPhong.Text == "")
            {
                MessageBox.Show("Bạn chưa chọn phòng\nHãy chọn 1 phòng bất kỳ!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (txtTinhTrang.Text == "Đã thuê")
            {
                MessageBox.Show("Phòng đã được thuê!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            FormThuePhong.idPhong = idPhong;
            FormThuePhong form = new FormThuePhong();

            form.ShowDialog();
            if (success)
            {
                success = false;
                LoadDSPhong();
                DatLai();
            }
        }