예제 #1
0
 public IEnumerable <FuncionarioModel> Get([FromQuery] FuncionarioQO funcionario)
 {
     try
     {
         return(FuncionarioService.GetComParametro(funcionario));
     }
     catch (Exception)
     {
         throw;
     }
 }
예제 #2
0
        public IEnumerable <MaoObraOrcamentoModel> Get()
        {
            try
            {
                var listMaoObraOrcamento = MaoObraOrcamentoRepository.List();

                foreach (MaoObraOrcamentoModel maoObraOrcamento in listMaoObraOrcamento)
                {
                    var pessoaId = MetodosGenericosService.DlookupOrcamentaria("PESSOA_ID", "T_ORCA_MAO_OBRA_ORCAMENTO", $"MAO_OBRA_ORCAMENTO_ID = {maoObraOrcamento.MAO_OBRA_ORCAMENTO_ID}");

                    maoObraOrcamento.FUNCIONARIO = FuncionarioService.GetComParametro(new FuncionarioQO(int.Parse(pessoaId), "")).ToArray()[0];

                    maoObraOrcamento.LIST_CUSTO = CustosMaoObraService.Get(maoObraOrcamento.MAO_OBRA_ORCAMENTO_ID).ToList();
                }

                return(listMaoObraOrcamento);
            }
            catch (Exception)
            {
                throw;
            }
        }