/// <summary> /// Obtiene una lista de gastos fijos de la embarcacion tarifa /// </summary> /// <returns></returns> internal ResultadoInfo <AdministracionDeGastosFijosInfo> ObtenerTodos(TarifarioInfo filtro) { try { Dictionary <string, object> parameters = AUXAdministracionDeGastosFijosDAL.ObtenerParametrosPorID(filtro); DataSet ds = Retrieve("Tarifario_ObtenerEmbarqueGastoTarifa", parameters); ResultadoInfo <AdministracionDeGastosFijosInfo> result = null; if (ValidateDataSet(ds)) { result = MapAdministracionDeGastosFijosDAL.ObtenerTodos(ds); } return(result); } catch (SqlException ex) { Logger.Error(ex); throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex); } catch (BLToolkit.Data.DataException ex) { Logger.Error(ex); throw new ExcepcionServicio(MethodBase.GetCurrentMethod(), ex); } catch (Exception ex) { Logger.Error(ex); throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex); } }
/// <summary> /// Valida que la descripción del gasto fijo a registrar/editar no exista en la bd /// </summary> /// <param name="gastos"></param> /// <returns></returns> internal List <AdministracionDeGastosFijosInfo> ValidarDescripcion(AdministracionDeGastosFijosInfo gastos) { try { Logger.Info(); Dictionary <string, object> parameters = AUXAdministracionDeGastosFijosDAL.ObtenerParametrosValidarDescripcion(gastos); DataSet ds = Retrieve("AdministracionDeGastosFijos_ObtenerPorDescripcion", parameters); List <AdministracionDeGastosFijosInfo> result = null; if (ValidateDataSet(ds)) { result = MapAdministracionDeGastosFijosDAL.ValidarDescripcion(ds); } return(result); } 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); } }
/// <summary> /// Crea un nuevo gasto fijo /// </summary> /// <param name="gastos"></param> internal void CrearGastoFijo(AdministracionDeGastosFijosInfo gastos) { try { Logger.Info(); Dictionary <string, object> parameters = AUXAdministracionDeGastosFijosDAL.ObtenerParametrosCrear(gastos); Create("AdministracionDeGastosFijos_Crear", parameters); } 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); } }