/// <summary> /// Obtiene un lista paginada /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> internal ResultadoInfo <VigilanciaInfo> ObtenerCamionPorPagina(PaginacionInfo pagina, VigilanciaInfo filtro) { ResultadoInfo <VigilanciaInfo> lista = null; try { Dictionary <string, object> parameters = AuxPlacasVigilancia.ObtenerParametrosCamionPorPagina(pagina, filtro); DataSet ds = Retrieve("[dbo].[Vigilancia_Placas]", parameters); if (ValidateDataSet(ds)) { lista = MAPPlacasVigilanciaDAL.ObtenerCamionPorPagina(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(lista); }
/// <summary> /// Obtiene una lista de Organizacion filtrando por el estatus Activo = 1, Inactivo = 0 /// </summary> /// <returns></returns> internal List <VigilanciaInfo> ObtenerTodos(EstatusEnum estatus) { List <VigilanciaInfo> result = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxProductoVigilanciaDAL.ObtenerTodos(estatus); DataSet ds = Retrieve("[dbo].[Organizacion_ObtenerTodos]", parameters); if (ValidateDataSet(ds)) { result = MAPPlacasVigilanciaDAL.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(result); }
/// <summary> /// Obtiene un Organizacion por Id /// </summary> /// <returns></returns> internal VigilanciaInfo ObtenerPorID(VigilanciaInfo vigilancia) { VigilanciaInfo result = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxPlacasVigilancia.ObtenerParametroPorID(vigilancia); DataSet ds = Retrieve("Vigilancia_ObtenerCamionIDProveedorID", parameters); if (ValidateDataSet(ds)) { result = MAPPlacasVigilanciaDAL.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 una lista de todos los Organizaciones /// </summary> /// <returns></returns> internal List <VigilanciaInfo> ObtenerTodos() { List <VigilanciaInfo> result = null; try { Logger.Info(); DataSet ds = Retrieve("f"); if (ValidateDataSet(ds)) { result = MAPPlacasVigilanciaDAL.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(result); }