Esempio n. 1
0
        internal List <ComisionInfo> obtenerComisionesProveedor(int ProveedorID)
        {
            List <ComisionInfo> resultado = new List <ComisionInfo>();

            try
            {
                Logger.Info();
                Dictionary <string, object> parameters = AuxComisionDAL.ObtenerParametrosComisionesProveedor(ProveedorID);
                DataSet ds = Retrieve("Proveedor_ObtenerComisiones", parameters);

                if (ValidateDataSet(ds))
                {
                    resultado = MapComisionDAL.obtenerResultadoComisionesProveedor(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(resultado);
        }
Esempio n. 2
0
        internal List <TipoComisionInfo> ObtenerTiposComisiones()
        {
            List <TipoComisionInfo> resultado = new List <TipoComisionInfo>();

            try
            {
                Logger.Info();
                DataSet ds = Retrieve("Comision_ObtenerTipos");

                if (ValidateDataSet(ds))
                {
                    resultado = MapComisionDAL.ObtenerTiposComisiones(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(resultado);
        }