Ejemplo n.º 1
0
 private void btnAgregar_Click(object sender, EventArgs e)
 {
     try
     {
         destinoGlobal = Singleton.opDestino.BuscarDestinoNombre(cbo_destino.Text);
         var idDestino = destinoGlobal.id_destino.ToString();
         if (string.IsNullOrEmpty(txtNroVuelo.Text))
         {
             MessageBox.Show("El campo es requerido", "Alert", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
         }
         else
         {
             VuelosDestino vd = new VuelosDestino()
             {
                 NroVuelo   = txtNroVuelo.Text,
                 id_destino = Convert.ToInt32(idDestino)
             };
             Singleton.opVuelosDestino.insertarVuelosDestino(vd);
             var msj = MessageBox.Show("Vuelo destino insertado correctamente", "Mensaje", MessageBoxButtons.OK, MessageBoxIcon.Information);
             if (msj == DialogResult.OK)
             {
                 this.Hide();
                 InsertarVuelos v = new InsertarVuelos();
                 v.Show();
             }
         }
     }
     catch
     {
     }
 }
Ejemplo n.º 2
0
        private void mtlInsertarVuelos_Click(object sender, EventArgs e)
        {
            this.Hide();
            InsertarVuelos vuelo = new InsertarVuelos();

            vuelo.Show();
        }