Example #1
0
        /// <summary>
        ///     Obtiene un Proveedor que cuenta con Origen-Destino Configurado
        /// </summary>
        /// <returns></returns>
        internal ProveedorInfo ObtenerProveedorConfiguradoOrigenDestino(EmbarqueDetalleInfo embarque)
        {
            ProveedorInfo result = null;

            try
            {
                Logger.Info();
                Dictionary <string, object> parameters = AuxProveedorDAL.ObtenerProveedorConfiguradoOrigenDestino(embarque);
                DataSet ds = Retrieve("[dbo].[Proveedor_ObtenerProveedorPorConfiguracionOrigenDestino]", parameters);
                if (ValidateDataSet(ds))
                {
                    result = MapProveedorDAL.ObtenerProveedorConfiguradoOrigenDestino(ds);
                }
            }
            catch (SqlException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (DataException ex)
            {
                Logger.Error(ex);
                throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex);
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
            return(result);
        }
Example #2
0
 public static ProveedorInfo ObtenerProveedorConfiguradoOrigenDestino(EmbarqueDetalleInfo embarque)
 {
     try
     {
         var           proveedorPL = new ProveedorPL();
         ProveedorInfo proveedor   = proveedorPL.ObtenerProveedorConfiguradoOrigenDestino(embarque);
         return(proveedor);
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw;
     }
 }
Example #3
0
        /// <summary>
        ///      Obtiene un Proveedor que cuenta con Origen-Destino Configurado
        /// </summary>
        /// <returns> </returns>
        public ProveedorInfo ObtenerProveedorConfiguradoOrigenDestino(EmbarqueDetalleInfo embarque)
        {
            ProveedorInfo info;

            try
            {
                Logger.Info();
                var proveedorBL = new ProveedorBL();
                info = proveedorBL.ObtenerProveedorConfiguradoOrigenDestino(embarque);
            }
            catch (ExcepcionGenerica)
            {
                throw;
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
            return(info);
        }
Example #4
0
        /// <summary>
        ///     Obtiene Parametros por proveedorID, OrigeinID, DestinoID, Activo
        /// </summary>
        /// <returns></returns>
        internal static Dictionary <string, object> ObtenerProveedorConfiguradoOrigenDestino(EmbarqueDetalleInfo embarque)
        {
            Dictionary <string, object> parametros;

            try
            {
                Logger.Info();
                parametros = new Dictionary <string, object>
                {
                    { "@ProveedorID", embarque.Proveedor.ProveedorID },
                    { "@OrigenID", embarque.OrganizacionOrigen.OrganizacionID },
                    { "@DestinoID", embarque.OrganizacionDestino.OrganizacionID },
                    { "@Activo", EstatusEnum.Activo }
                };
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
            return(parametros);
        }