Ejemplo n.º 1
0
        public Retorno Pesquisar(PessoaJogo Entity, ParametrosOrdenacaoPaginacao parametros)
        {
            try
            {
                var retorno = new DataPessoaJogo().Pesquisar(Entity, parametros);

                if (retorno.IsValido)
                {
                    retorno.Entity = ConverterParaResultadoDataTables <PessoaJogo>(retorno, new DataPessoaJogo().PesquisarQuantidadeTotal(Entity).Entity.ConverteValor(0));
                }

                return(retorno);
            }
            catch (Exception ex)
            {
                return(Retorno.CriarRetornoExcecao(ex));
            }
        }
Ejemplo n.º 2
0
 public Retorno Salvar(PessoaJogo Entity)
 {
     try
     {
         Retorno retorno = PreenchimentoObrigatorio(Entity);
         if (retorno.IsValido)
         {
             if (Entity.Codigo == 0)
             {
                 retorno = new DataPessoaJogo().Incluir(Entity);
             }
             else
             {
                 retorno = new DataPessoaJogo().Alterar(Entity);
             }
         }
         return(retorno);
     }
     catch (Exception ex)
     {
         return(Retorno.CriarRetornoExcecao(ex));
     }
 }