Example #1
0
        public IEnumerable <OrcamentoIntumescenteModel> Get()
        {
            try
            {
                var listOrcamentoIntumescente = OrcamentoIntumescenteRepository.List();

                foreach (OrcamentoIntumescenteModel orcamentoIntumescente in listOrcamentoIntumescente)
                {
                    var pessoaId = MetodosGenericosService.DlookupOrcamentaria("PESSOA_ID", "T_ORCA_ORCAMENTO", $"ORCAMENTO_ID = {orcamentoIntumescente.ORCAMENTO_ID}");
                    orcamentoIntumescente.CLIENTE_ORCAMENTO = PessoaService.GetComParametro(new PessoaQO(int.Parse(pessoaId), "")).FirstOrDefault();

                    var materialId = MetodosGenericosService.DlookupOrcamentaria("MATERIAL_ID", "T_ORCA_ORCAMENTO_INTUMESCENTE", $"ORCAMENTO_ID = {orcamentoIntumescente.ORCAMENTO_ID}");
                    if (materialId != "")
                    {
                        orcamentoIntumescente.PRODUTO = MaterialService.GetComParametro(new MaterialQO(int.Parse(materialId), "", "")).FirstOrDefault();
                    }

                    orcamentoIntumescente.LIST_ITENS_ORCAMENTO_INTUMESCENTE = ItensOrcamentoIntumescenteService.GetComParametro(new ItensOrcamentoQO(0, orcamentoIntumescente.ORCAMENTO_ID)).ToList();
                    orcamentoIntumescente.LIST_MAO_OBRA_ORCAMENTO           = MaoObraOrcamentoService.Get(orcamentoIntumescente.ORCAMENTO_ID).ToList();
                    orcamentoIntumescente.LIST_CUSTO_ORCAMENTO       = CustoOrcamentoService.GetComParametro(new CustoOrcamentoQO(0, orcamentoIntumescente.ORCAMENTO_ID)).ToList();
                    orcamentoIntumescente.LIST_EQUIPAMENTO_ORCAMENTO = EquipamentoOrcamentoService.GetComParametro(new EquipamentoOrcamentoQO(0, orcamentoIntumescente.ORCAMENTO_ID)).ToList();
                    orcamentoIntumescente.LIST_MATERIAL_ORCAMENTO    = MaterialOrcamentoService.GetComParametro(new MaterialOrcamentoQO(0, orcamentoIntumescente.ORCAMENTO_ID)).ToList();
                    orcamentoIntumescente.TOTAIS_ORCAMENTO           = TotaisOrcamentoRepository.FindPorOrcamentoId(orcamentoIntumescente.ORCAMENTO_ID);
                }

                return(listOrcamentoIntumescente);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #2
0
        public IEnumerable <ItensOrcamentoGeralModel> Get()
        {
            try
            {
                var listItensOrcamentoGeral = ItensOrcamentoGeralRepository.List();

                foreach (ItensOrcamentoGeralModel itensOrcamentoGeral in listItensOrcamentoGeral)
                {
                    var materialId = MetodosGenericosService.DlookupOrcamentaria("MATERIAL_ID", "T_ORCA_ITENS_ORCAMENTO_GERAL", $"ITENS_ORCAMENTO_ID = {itensOrcamentoGeral.ITENS_ORCAMENTO_ID}");

                    itensOrcamentoGeral.PRODUTO = MaterialService.GetComParametro(new MaterialQO(int.Parse(materialId), "", "")).ToArray()[0];
                }

                return(listItensOrcamentoGeral);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #3
0
        public IEnumerable <MaterialOrcamentoModel> Get()
        {
            try
            {
                var listMaterialOrcamento = MaterialOrcamentoRepository.List();

                foreach (MaterialOrcamentoModel materialOrcamento in listMaterialOrcamento)
                {
                    var materialId = MetodosGenericosService.DlookupOrcamentaria("MATERIAL_ID", "T_ORCA_MATERIAL_ORCAMENTO", $"MATERIAL_ORCAMENTO_ID = {materialOrcamento.MATERIAL_ORCAMENTO_ID}");

                    materialOrcamento.MATERIAL = MaterialService.GetComParametro(new MaterialQO(int.Parse(materialId), "", "")).ToArray()[0];
                }

                return(listMaterialOrcamento);
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #4
0
 public IEnumerable <MaterialModel> Get([FromQuery] MaterialQO material)
 {
     try
     {
         return(MaterialService.GetComParametro(material));
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #5
0
        public IEnumerable <CartaCoberturaModel> Get()
        {
            try
            {
                List <CartaCoberturaModel> listCartaCobertura = CartaCoberturaRepository.List().ToList();

                foreach (CartaCoberturaModel cartaCobertura in listCartaCobertura)
                {
                    cartaCobertura.LIST_ITENS_CARTA_COBERTURA = ItensCartaCoberturaService.GetComParametro(new ItensCartaCoberturaQO(0, cartaCobertura.CARTA_COBERTURA_ID, "")).ToList();

                    var materialId = MetodosGenericosService.DlookupOrcamentaria("MATERIAL_ID", "T_ORCA_CARTA_COBERTURA", $"CARTA_COBERTURA_ID = {cartaCobertura.CARTA_COBERTURA_ID}");

                    cartaCobertura.MATERIAL = MaterialService.GetComParametro(new MaterialQO(int.Parse(materialId), "", "")).ToArray()[0];
                }

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