예제 #1
0
        public CrudActionTypes SalvarComUc(Dictionary <string, object> valoresUC, int idDesligamento)
        {
            try
            {
                oDao.StartTransactionMode();
                PrepararInclusao();
                Desligamento oReingresso = new Desligamento(idDesligamento, oDao);
                ClassFunctions.SetProperties(oReingresso, valoresUC);
                AgentePublico oAgente = new AgentePublico(oReingresso.AgentePublico.ID, oDao);
                oAgente.Ativo = true;
                oAgente.Salvar();

                CampoNuloOuInvalidoException ex = oReingresso.ValidarExterno();
                if (ex.Mensagens.Count > 0)
                {
                    throw ex;
                }

                CrudActionTypes evento = oReingresso.Salvar();

                oDao.Commit();
                return(evento);
            }
            catch
            {
                oDao.RollBack();
                throw;
            }
        }
예제 #2
0
        public override string alterar(int id)
        {
            Update_padrao  = base.alterar(id);
            Update_padrao += $" update MembroLgpd set Data_batismo='{Data_batismo}', " +
                             $" Desligamento='{Desligamento.ToString()}', Motivo_desligamento='{Motivo_desligamento}' where IdPessoa='{id}'";

            return(Update_padrao);
        }
예제 #3
0
 public void PrepararInclusao()
 {
     oAgentePublico = new AgentePublico(oDao);
     oDesligamento  = new Desligamento(oDao);
 }
예제 #4
0
 public Dictionary <string, object> Selecionar(int id)
 {
     oDesligamento = new Desligamento(id, oDao);
     return(ClassFunctions.GetProperties(oDesligamento));
 }
예제 #5
0
 public void PrepararInclusao()
 {
     oDesligamento = new Desligamento(oDao);
 }
예제 #6
0
 public void PrepararInclusao()
 {
     oReingresso = new Desligamento(oDao);
 }