Exemple #1
0
        private void SetTransactionInfoAddress(TransactionInfo r)
        {

            if (!UserPeopleId.HasValue && !FirstRegistrant.IsNew) 
                return;

            if (FirstPerson == null)
            {
                r.Address = FirstRegistrant.AddressLineOne.Truncate(50);
                r.Address2 = FirstRegistrant.AddressLineTwo.Truncate(50);
                r.City = FirstRegistrant.City;
                r.State = FirstRegistrant.State;
                r.Country = FirstRegistrant.Country;
                r.Zip = FirstRegistrant.ZipCode;
                r.Phone = FirstRegistrant.Phone.FmtFone();
            }
            else
            {
                r.Address = r.payinfo.Address ?? FirstPerson.PrimaryAddress.Truncate(50);
                r.Address2 = r.payinfo.Address2 ?? FirstPerson.PrimaryAddress2.Truncate(50);
                r.City = r.payinfo.City ?? FirstPerson.PrimaryCity;
                r.State = r.payinfo.State ?? FirstPerson.PrimaryState;
                r.Country = r.payinfo.Country ?? FirstPerson.PrimaryCountry;
                r.Zip = r.payinfo.Zip ?? FirstPerson.PrimaryZip;
                r.Phone = Util.PickFirst(r.payinfo.Phone, FirstPerson.HomePhone, FirstPerson.CellPhone).FmtFone();
            }
        }
Exemple #2
0
        private TransactionInfo InitializeTransactionInfo()
        {
            var r = new TransactionInfo();

			if (user != null && FirstPerson != null)
				r.payinfo = FirstPerson.PaymentInfos.FirstOrDefault();
			if (r.payinfo == null)
				r.payinfo = new PaymentInfo { MaskedAccount = "", MaskedCard = "" };
            return r;
        }
Exemple #3
0
        private void SetTransactionInfoForParents(TransactionInfo r)
        {
            if (FirstRegistrant.org == null || !FirstRegistrant.setting.AskVisible("AskParents")) 
                return;

            var a = (FirstRegistrant.fname ?? FirstRegistrant.mname ?? "").Trim().Split(' ');
            if (a.Length > 1)
            {
                r.First = a[0];
                r.Last = a[1];
            }
            else
                r.Last = a[0];
        }
Exemple #4
0
        private void SetTransactionInfo(TransactionInfo r)
        {
			if (user != null)
			{
			    r.First = user.FirstName;
			    r.Last = user.LastName;
			    r.Middle = user.MiddleName.Truncate(1);
			    r.Email = user.EmailAddress;
			    r.Suffix = user.SuffixCode;
			    r.Phone = (user.HomePhone ?? user.CellPhone).FmtFone();
			}
            else
            {
			    r.Email = FirstRegistrant.EmailAddress;
                r.First = FirstRegistrant.FirstName;
                r.Last = FirstRegistrant.LastName;
                r.Phone = FirstRegistrant.Phone;
            } 
        }