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; } }
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); }
public void PrepararInclusao() { oAgentePublico = new AgentePublico(oDao); oDesligamento = new Desligamento(oDao); }
public Dictionary <string, object> Selecionar(int id) { oDesligamento = new Desligamento(id, oDao); return(ClassFunctions.GetProperties(oDesligamento)); }
public void PrepararInclusao() { oDesligamento = new Desligamento(oDao); }
public void PrepararInclusao() { oReingresso = new Desligamento(oDao); }