public ActionResult FindRecord(int id, OnlineRegModel m) { // Anonymous person clicks submit to find their record var msg = m.CheckAlreadyCompleted(); if (msg.HasValue()) { return(PageMessage(msg)); } fromMethod = "FindRecord"; m.HistoryAdd("FindRecord id=" + id); if (id >= m.List.Count) { return(FlowList(m)); } var p = m.GetFreshFindInfo(id); if (p.NeedsToChooseClass()) { p.RegistrantProblem = "Please Make Selection Above"; return(FlowList(m)); } p.ValidateModelForFind(ModelState, id); if (!ModelState.IsValid) { return(FlowList(m)); } if (p.AnonymousReRegistrant()) { return(View("Continue/ConfirmReregister", m)); // send email with link to reg-register } if (p.IsSpecialReg()) { p.QuestionsOK = true; } else if (p.RegistrationFull()) { m.Log("Closed"); ModelState.AddModelError(m.GetNameFor(mm => mm.List[id].DateOfBirth), "Sorry, but registration is closed."); } p.FillPriorInfo(); p.SetSpecialFee(); if (!ModelState.IsValid || p.count == 1) { return(FlowList(m)); } // form is ok but not found, so show AddressGenderMarital Form p.PrepareToAddNewPerson(ModelState, id); p.Found = false; return(FlowList(m)); }
public ActionResult RegisterFamilyMember(int id, OnlineRegModel m) { // got here by clicking on a link in the Family list var msg = m.CheckAlreadyCompleted(); if (msg.HasValue()) { return(PageMessage(msg)); } fromMethod = "Register"; m.StartRegistrationForFamilyMember(id, ModelState); // show errors or take them to the Questions page return(FlowList(m)); }