AerolineaFrba.Generacion_Viaje.Form1.insertarNuevoViaje C# (CSharp) Method

insertarNuevoViaje() private method

private insertarNuevoViaje ( ) : Object
return Object
        private Object insertarNuevoViaje()
        {
            SQLManager manejador = new SQLManager();
            manejador.generarSP("GenerarNuevoViaje");
            manejador.agregarStringSP("@salida", dateTimePicker1.Value.ToString());
            manejador.agregarStringSP("@llegadaEstimada", dateTimePicker2.Value.ToString());
            manejador.agregarIntSP("@ruta", txtRuta);
            manejador.agregarStringSP("@matricula", txtMatricula.Text);

            try
            {
                manejador.ejecutarSP();
                return 1;
            }
            catch (System.Exception e)
            {
                MessageBox.Show(e.Message, "Erro al generar el nuevo viaje", MessageBoxButtons.OK);
                return null;
            }
        }