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); }
/// <summary> /// Guarda la comision para el proveedor /// </summary> /// <returns></returns> internal bool GuardarComisiones(List <ComisionInfo> Comisiones) { bool result = false; try { Dictionary <string, object> parameters = AuxComisionDAL.ObtenerParametrosGuardar(Comisiones); Create("Comision_GuardarLista", parameters); result = true; } 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); }