/// <summary> /// Busca la información de un modulo /// </summary> /// <param name="filtro"></param> /// <returns></returns> internal ResultadoInfo <ModuloInfo> ObtenerPorId(ModuloInfo filtro) { try { Logger.Info(); Dictionary <string, object> parameters = AuxModuloDAL.ObtenerParametrosPorId(filtro); DataSet ds = Retrieve("Modulo_ObtenerPorId", parameters); ResultadoInfo <ModuloInfo> result = null; if (ValidateDataSet(ds)) { result = MapModuloDAL.ObtenerPorId(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 modulos como una lista (para cargar un comboBox) /// </summary> /// <returns></returns> internal IList <ModuloInfo> ObtenerTodosAsList() { try { Logger.Info(); DataSet ds = Retrieve("Modulo_ObtenerTodos", null); IList <ModuloInfo> result = null; if (ValidateDataSet(ds)) { result = MapModuloDAL.ObtenerTodosAsList(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); } }