Пример #1
0
        private oSP_READ_FTP_X_LLAVE LEER_FTP()
        {
            //=======================================================================================
            // DECLARACION DE VARIABLES
            //=======================================================================================
            SMetodos Servicio = new SMetodos();
            List <oSP_READ_FTP_X_LLAVE> LISTA_FTP = new List <oSP_READ_FTP_X_LLAVE>();
            oSP_READ_FTP_X_LLAVE        FTP       = new oSP_READ_FTP_X_LLAVE();

            try
            {
                //=======================================================================================
                // CONSTRUCCION DE OBJETO
                //=======================================================================================
                iSP_READ_FTP_X_LLAVE ParametrosInput = new iSP_READ_FTP_X_LLAVE();
                ParametrosInput.LLAVE = "FTP_APL";

                //=======================================================================================
                // LLAMADA A SERVICIO
                //=======================================================================================
                LISTA_FTP = Servicio.SP_READ_FTP_X_LLAVE(ParametrosInput);

                //=======================================================================================
                // VALIDACION DE OBTENSION DE DATOS
                //=======================================================================================
                if (LISTA_FTP == null || LISTA_FTP.Count <= 0)
                {
                    throw new Exception("NO EXISTE CONFIGURACION DE SFTP");
                }

                //=======================================================================================
                // OBTENEMOS EL PRIMERN VALOR
                //=======================================================================================
                FTP = LISTA_FTP.First();

                return(FTP);
            }
            catch
            {
                throw;
            }
        }