internal IList <BancoInfo> ObtenerTodos() { IList <BancoInfo> bancoLista = null; try { DataSet ds = Retrieve("Banco_ObtenerTodos"); if (ValidateDataSet(ds)) { bancoLista = MapBancoDAL.ObtenerTodos(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(bancoLista); }
/// <summary> /// Obtiene el chofer por su identificador /// </summary> /// <param name="bancoInfo"></param> /// <returns></returns> internal BancoInfo ObtenerPorID(BancoInfo bancoInfo) { BancoInfo result = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxBancoDAL.ObtenerParametroPorID(bancoInfo); DataSet ds = Retrieve("Banco_ObtenerPorID", parameters); if (ValidateDataSet(ds)) { result = MapBancoDAL.ObtenerPorID(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(result); }
/// <summary> /// Obtiene un lista paginada de banco por el filtro especificado /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> internal ResultadoInfo <BancoInfo> ObtenerPorPagina(PaginacionInfo pagina, BancoInfo filtro) { ResultadoInfo <BancoInfo> bancoLista = null; try { Dictionary <string, object> parameters = AuxBancoDAL.ObtenerParametrosPorPagina(pagina, filtro); DataSet ds = Retrieve("Banco_ObtenerPorPagina", parameters); if (ValidateDataSet(ds)) { bancoLista = MapBancoDAL.ObtenerPorPagina(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(bancoLista); }