コード例 #1
0
 private void reservaToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     using (frmPesquisarReserva pesquisa = new frmPesquisarReserva())
     {
         if (pesquisa.ShowDialog() == DialogResult.OK)
         {
             frmReserva reserva = new frmReserva(pesquisa.escolhido.id);
             reserva.Show();
         }
     }
 }
コード例 #2
0
 private void quartoToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     using (frmPesquisarQuarto pesquisa = new frmPesquisarQuarto())
     {
         if (pesquisa.ShowDialog() == DialogResult.OK)
         {
             //List<reserva> reservas = pesquisa.escolhido.reserva.ToList();
             if (pesquisa.escolhido.reserva.ToList().Count > 0)
             {
                 frmReserva reserva = new frmReserva(pesquisa.escolhido.reserva.ElementAt(0).id);
                 reserva.Show();
             }
             else
             {
                 frmQuarto quarto = new frmQuarto(pesquisa.escolhido.id);
                 quarto.Show();
             }
         }
     }
 }
コード例 #3
0
        private void reservaToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmReserva reserva = new frmReserva();

            reserva.Show();
        }