private int InserirCicloEvento() { CicloEvento cicloEvento = new CicloEvento(IdCicloAtual, 1, DateTime.Now); if (chkTempoCiclo.Checked) { cicloEvento.IdEvento = 1; } if (chkDescCurto.Checked) { cicloEvento.IdEvento = 2; } if (chkDescLongo.Checked) { cicloEvento.IdEvento = 3; } if (chkResumo.Checked) { cicloEvento.IdEvento = 4; } CicloEventoRegrasDeNegocio cicloEventoRegras = new CicloEventoRegrasDeNegocio(); retornoDoIdEvento = cicloEventoRegras.Incluir(cicloEvento); return(retornoDoIdEvento); }
public int AlterarCicloEventoNoBanco() { CicloEvento cicloEvento = new CicloEvento(DateTime.Now); cicloEvento.Id = retornoDoIdEvento; if (cicloEvento.Id != 0) { CicloEventoRegrasDeNegocio cicloEventoRegras = new CicloEventoRegrasDeNegocio(); var retorno = cicloEventoRegras.Alterar(cicloEvento); } return(cicloEvento.Id); }