public ProcessResult <List <PerfilResponse> > Buscar(PerfilRequest filtro) { ProcessResult <List <PerfilResponse> > resultado = new ProcessResult <List <PerfilResponse> >(); try { List <PerfilLogic> lista = LogicRepository.Buscar( filtro.CodigoPerfil, filtro.CodigoSistema, filtro.Sistema, filtro.Nombre, filtro.Descripcion, filtro.EstadoRegistro, filtro.EstadoRegistroDescripcion, filtro.NumeroPagina, filtro.RegistrosPagina); resultado.Result = new List <PerfilResponse>(); foreach (PerfilLogic item in lista) { PerfilResponse Response = PerfilAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <PerfilService>(ex); } return(resultado); }
public ProcessResult <List <UsuariosResponse> > Buscar(UsuariosRequest filtro) { ProcessResult <List <UsuariosResponse> > resultado = new ProcessResult <List <UsuariosResponse> >(); try { List <UsuariosLogic> lista = LogicRepository.Buscar( filtro.CodigoUsuario, filtro.Nombre, filtro.Apellido, filtro.NumDocumentoIdentidad, filtro.Usuario, filtro.NombreCargo, filtro.CodigoCargo, filtro.EstadoRegistro, filtro.EstadoRegistroDescripcion, filtro.NumeroPagina, filtro.RegistrosPagina); resultado.Result = new List <UsuariosResponse>(); foreach (UsuariosLogic item in lista) { UsuariosResponse Response = UsuariosAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <UsuariosService>(ex); } return(resultado); }
public ProcessResult <List <DashboardResponse> > Buscar(DashboardRequest filtro) { ProcessResult <List <DashboardResponse> > resultado = new ProcessResult <List <DashboardResponse> >(); try { List <DashboardLogic> lista = LogicRepository.Buscar( filtro.CodigoIdioma, filtro.CodigoIndicador, filtro.TipoDashboard, filtro.Anio, filtro.Fecha, filtro.TipoPeriodicidad, filtro.CodigoSubTipoPeriodicidad); resultado.Result = new List <DashboardResponse>(); foreach (DashboardLogic item in lista) { DashboardResponse Response = DashboardAdapter.ObtenerListado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <DashboardService>(ex); } return(resultado); }
public ProcessResult <PerfilResponse> Obtener(int codigo) { ProcessResult <PerfilResponse> resultado = new ProcessResult <PerfilResponse>(); try { PerfilLogic lista = LogicRepository.Obtener(codigo); resultado.Result = new PerfilResponse(); if (resultado.Result != null) { resultado.Result = PerfilAdapter.ObtenerPaginado(lista); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <PerfilService>(ex); } return(resultado); }
public ProcessResult <SistemaResponse> Sistema_x_Token(string token, int codigo_usuario) { ProcessResult <SistemaResponse> resultado = new ProcessResult <SistemaResponse>(); try { SistemaLogic lista = LogicRepository.Sistema_x_Token(token, codigo_usuario); resultado.Result = new SistemaResponse(); if (resultado.Result != null) { resultado.Result = SistemaAdapter.ObtenerPaginado(lista); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <UsuariosService>(ex); } return(resultado); }
public ProcessResult <UsuariosResponse> Login(string usuario, string contrasena) { ProcessResult <UsuariosResponse> resultado = new ProcessResult <UsuariosResponse>(); try { UsuariosLogic lista = LogicRepository.Login(usuario, contrasena); resultado.Result = new UsuariosResponse(); if (resultado.Result != null) { resultado.Result = UsuariosAdapter.ObtenerPaginado(lista); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <UsuariosService>(ex); } return(resultado); }
public ProcessResult <UsuariosResponse> Obtener(int codigo, int codigoSistema) { ProcessResult <UsuariosResponse> resultado = new ProcessResult <UsuariosResponse>(); try { UsuariosLogic lista = LogicRepository.Obtener(codigo, codigoSistema); resultado.Result = new UsuariosResponse(); if (resultado.Result != null) { resultado.Result = UsuariosAdapter.ObtenerPaginado(lista); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <UsuariosService>(ex); } return(resultado); }
public ProcessResult <AsignacionResponse> Obtener(float codigo) { ProcessResult <AsignacionResponse> resultado = new ProcessResult <AsignacionResponse>(); try { AsignacionLogic lista = LogicRepository.Obtener(codigo); resultado.Result = new AsignacionResponse(); if (resultado.Result != null) { resultado.Result = AsignacionAdapter.ObtenerPaginado(lista); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <AsignacionService>(ex); } return(resultado); }
public ProcessResult <List <OpcionResponse> > Buscar(OpcionRequest filtro) { ProcessResult <List <OpcionResponse> > resultado = new ProcessResult <List <OpcionResponse> >(); try { List <OpcionLogic> lista = LogicRepository.Buscar( filtro.CodigoOpcion, filtro.CodigoModulo, filtro.OpcionPadre, filtro.OpcionPadreNombre, filtro.Nombre, filtro.Descripcion, filtro.Controlador, filtro.Metodo, filtro.Area, filtro.EstadoRegistro, filtro.EstadoRegistroDescripcion, filtro.NumeroPagina, filtro.RegistrosPagina); resultado.Result = new List <OpcionResponse>(); foreach (OpcionLogic item in lista) { OpcionResponse Response = OpcionAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <OpcionService>(ex); } return(resultado); }
public ProcessResult <List <PerfilResponse> > Listar() { ProcessResult <List <PerfilResponse> > resultado = new ProcessResult <List <PerfilResponse> >(); try { List <PerfilLogic> lista = LogicRepository.Listar(); resultado.Result = new List <PerfilResponse>(); foreach (PerfilLogic item in lista) { PerfilResponse Response = PerfilAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <PerfilService>(ex); } return(resultado); }
public ProcessResult <List <OpcionResponse> > Usuario_x_Sistema(string usuario, int codigo_sistema) { ProcessResult <List <OpcionResponse> > resultado = new ProcessResult <List <OpcionResponse> >(); try { List <OpcionLogic> lista = LogicRepository.Usuario_x_Sistema(usuario, codigo_sistema); resultado.Result = new List <OpcionResponse>(); foreach (OpcionLogic item in lista) { OpcionResponse Response = OpcionAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <UsuariosService>(ex); } return(resultado); }
public void Init() { this.logicContext = new LogicContext(this.dbOptions); this.underTest = new LogicRepository(this.logicContext); }