Beispiel #1
0
 private void btnIngresar_Click(object sender, EventArgs e)
 {
     try
     {
         conexion.consulta("if not exists (SELECT Reserva_Id FROM HOTEL_CUATRIVAGOS.RESERVAS_X_HABITACION " +
                           "WHERE Reserva_Id =" + txtNroReserva.Text +
                           " AND Habitacion_Id =" + txtNroHab.Text + ") begin raiserror('Reserva no encontrada',16,1) end ");
         AgregarConsu levantar = new AgregarConsu(this, conexion);
         this.Hide();
         levantar.ShowDialog();
         this.Show();
     }
     catch (Exception exec)
     {
         MessageBox.Show(exec.Message);
     }
 }
Beispiel #2
0
 private void btnIngresar_Click(object sender, EventArgs e)
 {
     try
     {
         conexion.consulta("if not exists (SELECT Reserva_Id FROM NENE_MALLOC.Reserva_Por_Habitacion " +
         "WHERE Reserva_Id =" + txtNroReserva.Text +
         " AND Habitacion_Id =" + txtNroHab.Text + ") begin raiserror('Reserva no encontrada',16,1) end ");
         AgregarConsu levantar = new AgregarConsu(this, conexion);
         this.Hide();
         levantar.ShowDialog();
         this.Show();
     }
     catch (Exception exec)
     {
         MessageBox.Show(exec.Message);
     }
 }