Пример #1
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();
             }
         }
     }
 }
Пример #2
0
        private void quartoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmQuarto quarto = new frmQuarto();

            quarto.Show();
        }