public ProcessResult <List <AsignacionResponse> > Buscar(AsignacionRequest filtro) { ProcessResult <List <AsignacionResponse> > resultado = new ProcessResult <List <AsignacionResponse> >(); try { List <AsignacionLogic> lista = LogicRepository.Buscar( filtro.CodigoAsignacion, filtro.CodigoSistema, filtro.CodigoUsuario, filtro.CodigoPerfil, filtro.Sistema, filtro.Usuario, filtro.Perfil, filtro.EstadoRegistro, filtro.EstadoRegistroDescripcion, filtro.NumeroPagina, filtro.RegistrosPagina); resultado.Result = new List <AsignacionResponse>(); foreach (AsignacionLogic item in lista) { AsignacionResponse Response = AsignacionAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <PerfilService>(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 <AsignacionResponse> > Listar() { ProcessResult <List <AsignacionResponse> > resultado = new ProcessResult <List <AsignacionResponse> >(); try { List <AsignacionLogic> lista = LogicRepository.Listar(); resultado.Result = new List <AsignacionResponse>(); foreach (AsignacionLogic item in lista) { AsignacionResponse Response = AsignacionAdapter.ObtenerPaginado(item); resultado.Result.Add(Response); } } catch (Exception ex) { resultado.IsSuccess = false; resultado.Exception = new ApplicationLayerException <AsignacionService>(ex); } return(resultado); }