예제 #1
0
파일: Confirm.cs 프로젝트: marius310/bvcms
        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);
        }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
파일: Confirm.cs 프로젝트: bsbillings/bvcms
 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;
 }