/// <summary> /// Obtiene los folios por pagina /// </summary> /// <param name="pagina"></param> /// <param name="filtro"></param> /// <returns></returns> internal ResultadoInfo <OperadorInfo> ObtenerPorPaginaFiltroBasculista(PaginacionInfo pagina, OperadorInfo filtro) { ResultadoInfo <OperadorInfo> lista = null; try { Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametrosPorPaginaFiltroBasculista(pagina, filtro); DataSet ds = Retrieve("Operador_ObtenerPorPagina", parameters); if (ValidateDataSet(ds)) { lista = MapOperadorDAL.ObtenerPorPaginaCompletoBasculista(ds); } } catch (System.Data.SqlClient.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 un operador por Id /// </summary> /// <param name="operadorID"></param> /// <returns></returns> internal OperadorInfo ObtenerPorID(int operadorID) { OperadorInfo operadorInfo = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametroPorID(operadorID); DataSet ds = Retrieve("Operador_ObtenerPorID", parameters); if (ValidateDataSet(ds)) { operadorInfo = MapOperadorDAL.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(operadorInfo); }
/// <summary> /// Obtiene un Folio por Id /// </summary> /// <param name="id"></param> /// <returns></returns> internal OperadorInfo ObtenerBasculistaPorId(long id) { OperadorInfo result = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerBasculistaPorId(id); DataSet ds = Retrieve("Operador_ObtenerPorRolIDUsuarioID", parameters); if (ValidateDataSet(ds)) { result = MapOperadorDAL.ObtenerBasculistaPorId(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); }
internal OperadorInfo ObtenerDetectorCorral(int organizacionId, int corralID, int operadorId) { OperadorInfo operadorInfo = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametroObtenerDetectorCorral(organizacionId, corralID, operadorId); DataSet ds = Retrieve("DeteccionGanado_ObtenerDetectorCorral", parameters); if (ValidateDataSet(ds)) { operadorInfo = MapOperadorDAL.ObtenerPorUsuarioID(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(operadorInfo); }
internal IList <NotificacionInfo> ObtenerNotificacionesDeteccionLista(int organizacionId, int operadorId) { IList <NotificacionInfo> operadorInfo = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametroNotificacionesDeteccionLista(organizacionId, operadorId); DataSet ds = Retrieve("DeteccionGanado_ObtenerNotificaciones", parameters); if (ValidateDataSet(ds)) { operadorInfo = MapOperadorDAL.ObtenerNotificacionesDeteccionLista(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(operadorInfo); }
/// <summary> /// Obtiene un Operador que es Usuario /// </summary> /// <param name="usuarioId"></param> /// <param name="organizacionId"> </param> /// <param name="basculista"></param> /// <returns></returns> internal OperadorInfo ObtenerPorUsuarioIdRol(int usuarioId, int organizacionId, Roles basculista) { try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametrosPorUsuarioIdRol(usuarioId, organizacionId, basculista); DataSet ds = Retrieve("Operador_ObtenerPorUsuarioIdRol", parameters); OperadorInfo result = null; if (ValidateDataSet(ds)) { result = MapOperadorDAL.ObtenerPorUsuarioIdRol(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 un registro de Operador /// </summary> /// <param name="descripcion">Descripción de la Operador</param> /// <returns></returns> internal OperadorInfo ObtenerPorDescripcion(string descripcion) { try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametrosPorDescripcion(descripcion); DataSet ds = Retrieve("Operador_ObtenerPorDescripcion", parameters); OperadorInfo result = null; if (ValidateDataSet(ds)) { result = MapOperadorDAL.ObtenerPorDescripcion(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> /// Metodo para Crear un registro de Operador /// </summary> /// <param name="info">Valores de la entidad que será creada</param> internal int Crear(OperadorInfo info) { try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametrosCrear(info); int result = Create("Operador_Crear", parameters); 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 operadores por Id rol /// </summary> /// <param name="supervisorId"></param> /// <param name="organizacionId"></param> /// <returns></returns> internal IList <OperadorInfo> ObtenerPorIdRolDetector(int organizacionId, int supervisorId) { IList <OperadorInfo> operadorInfo = null; try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametrosPorSupervisorDetector(organizacionId, supervisorId); DataSet ds = Retrieve("SupervicionTecnicaDetectores_Detectores", parameters); if (ValidateDataSet(ds)) { operadorInfo = MapOperadorDAL.ObtenerPorIdRol(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(operadorInfo); }
/// <summary> /// Metodo para actualizar un registro de Operador /// </summary> /// <param name="info">Valores de la entidad que se actualizarán</param> internal void Actualizar(OperadorInfo info) { try { Logger.Info(); Dictionary <string, object> parameters = AuxOperadorDAL.ObtenerParametrosActualizar(info); Update("Operador_Actualizar", 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); } }