/// <summary>
 /// a member can register, and skip the 2nd step
 /// if these values are then set afterwards when editing this profile, then we can then mark the registration as complete
 /// </summary>
 /// <param name="partier"></param>
 private void CheckRegistrationComplete(IPartier partier)
 {
     // once it has been completed, we never revert back, so only process if dot mailer thinks the host hasn't yet completed registration
     if (!partier.DotMailerRegistrationComplete)
     {
         if (!string.IsNullOrWhiteSpace(partier.FirstName) && !string.IsNullOrWhiteSpace(partier.LastName) && !string.IsNullOrWhiteSpace(partier.BillingAddress.ToString()))
         {
             if (partier is PartyHost)
             {
                 DotMailerService.HostRegistrationCompleted((Contact)(PartyHost)partier);
             }
             else if (partier is PartyGuest)
             {
                 DotMailerService.GuestRegistrationCompleted((Contact)(PartyGuest)partier);
             }
         }
     }
 }
        public ActionResult HandleRegisterHostPartyKitForm(RegisterHostPartyKitForm registerHostPartyKitForm)
        {
            if (!ModelState.IsValid)
            {
                return(this.CurrentUmbracoPage());
            }

            PartyHost partyHost = (PartyHost)this.Members.GetCurrentMember();

            if (partyHost.FirstName != registerHostPartyKitForm.FirstName)
            {
                partyHost.FirstName = registerHostPartyKitForm.FirstName;
            }

            if (partyHost.LastName != registerHostPartyKitForm.LastName)
            {
                partyHost.LastName = registerHostPartyKitForm.LastName;
            }

            Address address = new Address(
                registerHostPartyKitForm.Address1,
                registerHostPartyKitForm.Address2,
                registerHostPartyKitForm.TownCity,
                registerHostPartyKitForm.PostCode);

            partyHost.PartyKitAddress = address;
            partyHost.PartyAddress    = address;
            partyHost.BillingAddress  = address;

            partyHost.TShirtSize = registerHostPartyKitForm.TShirtSize;

            partyHost.HasRequestedPartyKit = true;

            // update contact in DotMailer
            DotMailerService.HostRegistrationCompleted((Contact)partyHost);

            // mark as completed
            partyHost.DotMailerRegistrationComplete = true;

            //return this.CurrentUmbracoPage();
            return(this.RedirectToCurrentUmbracoPage());
        }