예제 #1
0
        public void Put(int pessoaId, PessoaModel pessoa)
        {
            try
            {
                var where = $"PESSOA_ID = {pessoaId}";
                if (string.IsNullOrEmpty(MetodosGenericosService.DlookupOrcamentaria("PESSOA_ID", "T_ORCA_PESSOA", where)))
                {
                    throw new Exception();
                }

                if (MetodosGenericosService.DlookupOrcamentaria("TIPO_CADASTRO", "T_ORCA_PESSOA", where) == "Funcionario" && pessoa.TIPO_CADASTRO != "Funcionario")
                {
                    throw new Exception();
                }

                PessoaRepository.Update(pessoaId, pessoa);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #2
0
 public OrcamentoIntumescenteModel(string grupo, string ocupacaoUso, string classe, string divisao, string tempoResistenciaFogo,
                                   double qtdeLitrosTotal, double percentualPerda, double qtdeBaldes, double qtdeBaldesReal,
                                   double valorUnitarioIntumescente, double valorBaldeIntumescente, MaterialModel produto, List <ItensOrcamentoIntumescenteModel> itensOrcamentoIntumescente,
                                   int orcamentoId, string nomeObra, string referencia, string prazoEntrega, int diasTrabalhado, DateTime dataCriacaoOrcamento,
                                   string contatoObra, string tipoObra, TotaisOrcamentoModel totaisOrcamento, PessoaModel clienteOrcamento,
                                   List <MaoObraOrcamentoModel> maoObraOrcamento, List <CustoOrcamentoModel> custoOrcamento,
                                   List <EquipamentoOrcamentoModel> equipamentoOrcamento, List <MaterialOrcamentoModel> materialOrcamento) : base(orcamentoId, nomeObra, referencia,
                                                                                                                                                  prazoEntrega, diasTrabalhado, dataCriacaoOrcamento, contatoObra, tipoObra, totaisOrcamento, clienteOrcamento,
                                                                                                                                                  maoObraOrcamento, custoOrcamento, equipamentoOrcamento, materialOrcamento)
 {
     GRUPO                             = grupo;
     OCUPACAO_USO                      = ocupacaoUso;
     CLASSE                            = classe;
     DIVISAO                           = divisao;
     TEMPO_RESISTENCIA_FOGO            = tempoResistenciaFogo;
     QTDE_LITROS_TOTAL                 = qtdeLitrosTotal;
     PERCENTUAL_PERDA                  = percentualPerda;
     QTDE_BALDES                       = qtdeBaldes;
     QTDE_BALDES_REAL                  = qtdeBaldesReal;
     VALOR_UNITARIO_INTUMESCENTE       = valorUnitarioIntumescente;
     VALOR_BALDE_INTUMESCENTE          = valorBaldeIntumescente;
     PRODUTO                           = produto;
     LIST_ITENS_ORCAMENTO_INTUMESCENTE = itensOrcamentoIntumescente;
     ORCAMENTO_ID                      = orcamentoId;
     NOME_OBRA                         = nomeObra;
     REFERENCIA                        = referencia;
     PRAZO_ENTREGA                     = prazoEntrega;
     DIAS_TRABALHADO                   = diasTrabalhado;
     DATA_CRIACAO_ORCAMENTO            = dataCriacaoOrcamento;
     A_C                        = contatoObra;
     TIPO_OBRA                  = tipoObra;
     TOTAIS_ORCAMENTO           = totaisOrcamento;
     CLIENTE_ORCAMENTO          = clienteOrcamento;
     LIST_MAO_OBRA_ORCAMENTO    = maoObraOrcamento;
     LIST_CUSTO_ORCAMENTO       = custoOrcamento;
     LIST_EQUIPAMENTO_ORCAMENTO = equipamentoOrcamento;
     LIST_MATERIAL_ORCAMENTO    = materialOrcamento;
 }
예제 #3
0
 public OrcamentoGeralModel(List <ItensOrcamentoGeralModel> itensOrcamentoGeral,
                            int orcamentoId, string nomeObra, string referencia, string prazoEntrega, int diasTrabalhado, DateTime dataCriacaoOrcamento,
                            string contatoObra, string tipoObra, TotaisOrcamentoModel totaisOrcamento, PessoaModel clienteOrcamento,
                            List <MaoObraOrcamentoModel> maoObraOrcamento, List <CustoOrcamentoModel> custoOrcamento, List <EquipamentoOrcamentoModel> equipamentoOrcamento,
                            List <MaterialOrcamentoModel> materialOrcamento) : base(orcamentoId, nomeObra, referencia, prazoEntrega, diasTrabalhado, dataCriacaoOrcamento,
                                                                                    contatoObra, tipoObra, totaisOrcamento, clienteOrcamento, maoObraOrcamento, custoOrcamento, equipamentoOrcamento, materialOrcamento)
 {
     LIST_ITENS_ORCAMENTO_GERAL = itensOrcamentoGeral;
     ORCAMENTO_ID           = orcamentoId;
     NOME_OBRA              = nomeObra;
     REFERENCIA             = referencia;
     PRAZO_ENTREGA          = prazoEntrega;
     DIAS_TRABALHADO        = diasTrabalhado;
     DATA_CRIACAO_ORCAMENTO = dataCriacaoOrcamento;
     A_C                        = contatoObra;
     TIPO_OBRA                  = tipoObra;
     TOTAIS_ORCAMENTO           = totaisOrcamento;
     CLIENTE_ORCAMENTO          = clienteOrcamento;
     LIST_ITENS_ORCAMENTO_GERAL = itensOrcamentoGeral;
     LIST_MAO_OBRA_ORCAMENTO    = maoObraOrcamento;
     LIST_CUSTO_ORCAMENTO       = custoOrcamento;
     LIST_EQUIPAMENTO_ORCAMENTO = equipamentoOrcamento;
     LIST_MATERIAL_ORCAMENTO    = materialOrcamento;
 }