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(); } }
private void btnDatPhong_Click(object sender, EventArgs e) { this.Hide(); DatPhong frmDP = new DatPhong(); frmDP.ShowDialog(); }
private void Button_DatPhong(object sender, RoutedEventArgs e) { DatPhong dp = new DatPhong(); dp.tentaikhoan = this.tentaikhoan; dp.ShowDialog(); }
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(); } }
private void NhanPhong_Click(object sender, EventArgs e) { DatPhong dp = new DatPhong(); dp.ShowDialog(); }
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(); //} }