private void listViewEx1_MouseClick(object sender, MouseEventArgs e)
        {
            dataPhong dtp     = new dataPhong();
            string    maphong = listViewEx1.SelectedItems[0].Text;

            if (dtp.Kiemtraphong(maphong) == 1)
            {
                ChiTietPhong.Maphong = maphong;
                ChiTietPhong phong = new ChiTietPhong();

                phong.ShowDialog();
            }
            if (dtp.Kiemtraphong(maphong) == 0)
            {
                DatPhong.MaPhong = maphong;
                DatPhong datPhong = new DatPhong();
                datPhong.ShowDialog();
            }
            TrangThaiPhong ttp = new TrangThaiPhong();

            if (dtp.Kiemtraphong(maphong) == 2)
            {
                TrangThaiPhong.trangthai = "đang dọn dẹp";
                TrangThaiPhong.maphong   = maphong;
                ttp.ShowDialog();
            }
            if (dtp.Kiemtraphong(maphong) == 3)
            {
                TrangThaiPhong.trangthai = "đang sửa chữa";
                TrangThaiPhong.maphong   = maphong;
                ttp.ShowDialog();
            }
        }
示例#2
0
        private void btnDatPhong_Click(object sender, EventArgs e)
        {
            this.Hide();
            DatPhong frmDP = new DatPhong();

            frmDP.ShowDialog();
        }
示例#3
0
        private void Button_DatPhong(object sender, RoutedEventArgs e)
        {
            DatPhong dp = new DatPhong();

            dp.tentaikhoan = this.tentaikhoan;
            dp.ShowDialog();
        }
示例#4
0
 private void bt_ct_Click(object sender, EventArgs e)
 {
     if (scm == "")
     {
         DatPhong.mp = mp;
         DatPhong dp = new DatPhong();
         dp.Show();
     }
     else
     {
         Phong.maphong = mp;
         Phong p = new Phong();
         p.Show();
     }
 }
示例#5
0
        private void NhanPhong_Click(object sender, EventArgs e)
        {
            DatPhong dp = new DatPhong();

            dp.ShowDialog();
        }
示例#6
0
        private void listViewEx1_MouseClick(object sender, MouseEventArgs e)
        {
            dataPhong dtp     = new dataPhong();
            string    maphong = listViewEx1.SelectedItems[0].Name.ToString();
            //MessageBox.Show(maphong);
            int check = client.ktraPhong(Convert.ToInt32(maphong));

            switch (check)
            {
            case 2:
                ChiTietPhong.idP = Convert.ToInt32(maphong);
                ChiTietPhong phong = new ChiTietPhong();
                phong.ShowDialog();
                listPhong(-1);
                break;

            case 1:
                DatPhong.MaPhong = listViewEx1.SelectedItems[0].Text.ToString();;
                DatPhong.idp     = Convert.ToInt32(maphong);
                DatPhong datPhong = new DatPhong();
                datPhong.ShowDialog();
                listPhong(-1);
                break;

            case 3:
                MessageBox.Show("Phòng đang dọn dẹp");
                break;

            case 4:
                MessageBox.Show("Phòng đang sửa chữa");
                break;

            default:
                MessageBox.Show("Xảy ra lỗi xin mời thử lại");
                break;
            }

            //if(dtp.Kiemtraphong(maphong)==1)
            //{
            //    ChiTietPhong.Maphong = maphong;
            //    ChiTietPhong phong = new ChiTietPhong();

            //    phong.ShowDialog();
            //}
            //if (dtp.Kiemtraphong(maphong) == 0)
            //{
            //    DatPhong.MaPhong = maphong;
            //    DatPhong datPhong = new DatPhong();
            //    datPhong.ShowDialog();
            //}
            //TrangThaiPhong ttp = new TrangThaiPhong();
            //if (dtp.Kiemtraphong(maphong) == 2)
            //{
            //    TrangThaiPhong.trangthai = "đang dọn dẹp";
            //    TrangThaiPhong.maphong = maphong;
            //    ttp.ShowDialog();
            //}
            //if (dtp.Kiemtraphong(maphong) == 3)
            //{
            //    TrangThaiPhong.trangthai = "đang sửa chữa";
            //    TrangThaiPhong.maphong = maphong;
            //    ttp.ShowDialog();
            //}
        }