AddToMemberDataBelowComments() public method

public AddToMemberDataBelowComments ( string s ) : void
s string
return void
Example #1
0
        private void LogRegistrationOnOrgMember(Transaction transaction, OrganizationMember om, string paylink)
        {
            var reg = person.GetRecReg();
            var sb = new StringBuilder();

            sb.AppendFormat("{0:g} ----------------\n", DateTime.Now);
            if (om.AmountPaid > 0)
            {
                var others = GetOthersInTransaction(transaction);
                sb.AppendFormat("{0:c} ({1} id) transaction amount\n", transaction.Amt, transaction.Id);
                sb.AppendFormat("{0:c} applied to this registrant\n", AmountToPay());
                sb.AppendFormat("{0:c} total due all registrants\n", transaction.Amtdue);
                if (others.HasValue())
                    sb.AppendFormat("Others: {0}\n", others);
            }
            om.AddToMemberDataBelowComments(sb.ToString());

            var sbreg = new StringBuilder();
            sbreg.Append($"{org.OrganizationName}\n");
            sbreg.AppendFormat("{0:g} ----------------\n", DateTime.Now);
            if (om.AmountPaid > 0)
            {
                sbreg.AppendFormat("{0:c} ({1} id) transaction amount\n", transaction.Amt, transaction.Id);
                sbreg.AppendFormat("{0:c} applied to this registrant\n", AmountToPay());
                sbreg.AppendFormat("{0:c} total due all registrants\n", transaction.Amtdue);
            }
            if (paylink.HasValue())
            {
                sbreg.AppendLine(paylink);
                om.PayLink = paylink;
            }
            if (request.HasValue())
            {
                sbreg.AppendFormat("Request: {0}\n", request);
                om.Request = request.Truncate(140);
            }
            sbreg.AppendFormat("{0}\n", EmailAddress);

            reg.AddToComments(sbreg.ToString());
        }
Example #2
0
 private void SaveMenuChoices(OrganizationMember om, Ask ask)
 {
     foreach (var i in MenuItem[ask.UniqueId])
         om.AddToGroup(DbUtil.Db, i.Key, i.Value);
     {
         var menulabel = ((AskMenu) ask).Label;
         foreach (var i in ((AskMenu) ask).MenuItemsChosen(MenuItem[ask.UniqueId]))
         {
             om.AddToMemberDataBelowComments(menulabel);
             var desc = i.amt > 0 
                 ? $"{i.number} {i.desc} (at {i.amt:N2})" 
                 : $"{i.number} {i.desc}";
             om.AddToMemberDataBelowComments(desc);
             menulabel = string.Empty;
         }
     }
 }