public RouteModel FinishRegistration(Transaction ti) { TranId = ti.Id; HistoryAdd("ProcessPayment"); var ed = DbUtil.Db.RegistrationDatas.Single(dd => dd.Id == DatumId); ed.Data = Util.Serialize(this); ed.Completed = true; DbUtil.Db.SubmitChanges(); try { LogOutOfOnlineReg(); var view = ConfirmTransaction(ti.TransactionId); switch (view) { case ConfirmEnum.Confirm: return(RouteModel.ViewAction("Confirm", this)); case ConfirmEnum.ConfirmAccount: return(RouteModel.ViewAction("ConfirmAccount", this)); } } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); return(RouteModel.ErrorMessage(ex.Message)); } return(null); }
private RouteModel CheckAskDonation(OnlineRegController ctl) { if (AskDonation() && !donor.HasValue && donation > 0) { ctl.SetHeaders(this); ctl.ModelState.AddModelError("donation", "Please indicate a donor or clear the donation amount"); Log("AskDonation"); return(RouteModel.ViewAction("Other/AskDonation")); } return(null); }
private RouteModel CheckSpecialJavascript() { if (org != null && org.RegistrationTypeId == RegistrationTypeCode.SpecialJavascript) { var p = List[0]; if (p.IsNew) { p.AddPerson(null, p.org.EntryPointId ?? 0); } SpecialRegModel.SaveResults(Orgid ?? 0, List[0].PeopleId ?? 0, List[0].SpecialTest); Log("SpecialJavascript"); return(RouteModel.ViewAction("Other/SpecialRegistrationResults")); } return(null); }
public RouteModel ConfirmTransaction(Transaction ti) { try { LogOutOfOnlineReg(); var view = ConfirmTransaction(ti.TransactionId); switch (view) { case ConfirmEnum.Confirm: return RouteModel.ViewAction("Confirm", this); case ConfirmEnum.ConfirmAccount: return RouteModel.ViewAction("ConfirmAccount", this); } } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); return RouteModel.ErrorMessage(ex.Message); } return null; }