public RegistrationJournalPhaseEnum NextPhase() { if (successfullRegistration == RegistrationSuccesEnum.Pending) { if (type == RegistrationJournalTypeEnum.Update && phase == RegistrationJournalPhaseEnum.InputValidation) { phase = RegistrationJournalPhaseEnum.TechnicalSpecification; } else { phase += 1; } } else if (successfullRegistration != RegistrationSuccesEnum.Pending) { throw new NotImplementedException(); } if (phase == RegistrationJournalPhaseEnum.Published) { successfullRegistration = RegistrationSuccesEnum.Successfull; } return(phase); }
public RegistrationJournal(int?id = null) { type = (id.HasValue) ? RegistrationJournalTypeEnum.Update : RegistrationJournalTypeEnum.Registration; phase = RegistrationJournalPhaseEnum.InputValidation; successfullRegistration = RegistrationSuccesEnum.Pending; }