AerolineaFrba.Registro_Llegada_Destino.Form1.esOrigenValido C# (CSharp) Method

esOrigenValido() private method

private esOrigenValido ( ) : bool
return bool
        private bool esOrigenValido()
        {
            SqlCommand command = new SqlCommand();
            command.Connection = Program.conexion();
            command.CommandType = System.Data.CommandType.Text;
            command.CommandText = "SELECT ABSTRACCIONX4.esOrigenCorrecto(@viaje_cod , @ciuOrigenTxt)";
            command.CommandTimeout = 0;

            command.Parameters.AddWithValue("@viaje_cod", viaje_cod_diferido);
            command.Parameters.AddWithValue("@ciuOrigenTxt", txtCiudadOrigen.Text);

            return (bool)command.ExecuteScalar();
        }