示例#1
0
        private void viewBookRoomToolStripMenuItem_Click(object sender, EventArgs e)
        {
            fViewBookRoom f = new fViewBookRoom();

            this.Hide();
            f.ShowDialog();
            this.Show();
        }
示例#2
0
        private void btnBookRoomCus_Click(object sender, EventArgs e)
        {
            string   statusupdate = "book";
            int      idRoom       = RoomDAO.RoomChoose;
            int      idCustomer   = Convert.ToInt32(txbIdCus.Text);
            DateTime Datecheckin  = RoomDAO.DateCheckIn;
            DateTime DateCheckout = RoomDAO.DateCheckOut;

            BookRoomDAO.Instance.InsertBookRoom(idRoom, idCustomer, Datecheckin, DateCheckout);
            RoomDAO.Instance.UpdateStatusRoom(idRoom, statusupdate);
            if (MessageBox.Show("Đặt Phòng thành công!", "Thông báo", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK)
            {
                fViewBookRoom f = new fViewBookRoom();
                this.Hide();
                f.ShowDialog();
            }
        }