/// <summary> /// Obtiene un lista paginada /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> internal ResultadoInfo <CausaPrecioInfo> ObtenerPorPagina(PaginacionInfo pagina, CausaPrecioInfo filtro) { try { Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerParametrosPorPagina(pagina, filtro); DataSet ds = Retrieve("CausaPrecio_ObtenerPorPagina", parameters); ResultadoInfo <CausaPrecioInfo> result = null; if (ValidateDataSet(ds)) { result = MapCausaPrecioDAL.ObtenerPorPagina(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); } }
internal List <CausaPrecioInfo> ObtenerPorPrecioPorCausaSalida(int causa, int organizacionID) { try { Logger.Info(); Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerPorPrecioPorCausaSalida(causa, organizacionID); DataSet ds = Retrieve("CausaPrecio_ObtenerPorCausaSalida", parameters); List <CausaPrecioInfo> result = null; if (ValidateDataSet(ds)) { result = MapCausaPrecioDAL.ObtenerPorPrecioPorCausaSalida(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> /// Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0 /// </summary> /// <returns></returns> internal IList <CausaPrecioInfo> ObtenerTodos(EstatusEnum estatus) { try { Logger.Info(); Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerTodos(estatus); DataSet ds = Retrieve("CausaPrecio_ObtenerTodos", parameters); IList <CausaPrecioInfo> result = null; if (ValidateDataSet(ds)) { result = MapCausaPrecioDAL.ObtenerTodos(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> /// Obtiene una instancia de CausaPrecioInfo /// </summary> /// <param name="filtro"></param> /// <returns></returns> internal CausaPrecioInfo ObtenerPorCausaSalidaPrecioGanado(CausaPrecioInfo filtro) { try { Dictionary <string, object> parameters = AuxCausaPrecioDAL.ObtenerParametrosPorCausaSalidaPrecioGanado(filtro); DataSet ds = Retrieve("CausaPrecio_ObtenerPorCausaSalidaPrecioGanado", parameters); CausaPrecioInfo result = null; if (ValidateDataSet(ds)) { result = MapCausaPrecioDAL.ObtenerPorCausaSalidaPrecioGanado(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> /// Obtiene una lista de CausaPrecio /// </summary> /// <returns></returns> internal IList <CausaPrecioInfo> ObtenerTodos() { try { Logger.Info(); DataSet ds = Retrieve("CausaPrecio_ObtenerTodos"); IList <CausaPrecioInfo> result = null; if (ValidateDataSet(ds)) { result = MapCausaPrecioDAL.ObtenerTodos(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); } }