PrepareSummaryText() public method

public PrepareSummaryText ( ) : string
return string
Example #1
0
        private void SendSingleConfirmationForOrg(OnlineRegPersonModel p)
        {
            var ts = TransactionSummary();

            DbUtil.Db.SetCurrentOrgId(p.orgid);
            var emailSubject = GetSubject(p);
            var details      = p.PrepareSummaryText();
            var message      = p.GetMessage(details);

            var NotifyIds = DbUtil.Db.StaffPeopleForOrg(p.org.OrganizationId);
            var notify    = NotifyIds[0];

            var location = p.org.Location;

            if (!location.HasValue())
            {
                location = masterorg.Location;
            }

            message = APIOrganization.MessageReplacements(DbUtil.Db, p.person,
                                                          masterorg.OrganizationName, p.org.OrganizationId, p.org.OrganizationName, location, message);

            if (Transaction.Donate > 0 && p == List[donor ?? 0])
            {
                message = DoDonationModifyMessage(message);
            }
            else
            {
                message = donationtext.Replace(message, "");
            }

            // send confirmations
            if (emailSubject != "DO NOT SEND")
            {
                DbUtil.Db.Email(notify.FromEmail, p.person, Util.EmailAddressListFromString(p.fromemail),
                                emailSubject, message, false);
                Log("SentConfirmation");
            }
            // notify the staff
            DbUtil.Db.Email(Util.PickFirst(p.person.FromEmail, notify.FromEmail),
                            NotifyIds, Header,
                            $@"{p.person.Name} has registered for {Header}<br/>
Feepaid for this registrant: {p.AmountToPay():C}<br/>
Others in this registration session: {p.GetOthersInTransaction(Transaction)}<br/>
Total Fee paid for this registration session: {ts?.TotPaid:C}<br/>
<pre>{p.PrepareSummaryText()}</pre>");
        }
Example #2
0
        private void SendSingleConfirmationForOrg(OnlineRegPersonModel p)
        {
            var ts = TransactionSummary();
            DbUtil.Db.SetCurrentOrgId(p.orgid);
            var emailSubject = GetSubject(p);
            var details = p.PrepareSummaryText();
            var message = p.GetMessage(details);

            var NotifyIds = DbUtil.Db.StaffPeopleForOrg(p.org.OrganizationId);
            var notify = NotifyIds[0];

            var location = p.org.Location;
            if (!location.HasValue())
                location = masterorg.Location;

            message = APIOrganization.MessageReplacements(DbUtil.Db, p.person,
                masterorg.OrganizationName, p.org.OrganizationId, p.org.OrganizationName, location, message);

            if (Transaction.Donate > 0 && p == List[donor ?? 0])
                message = DoDonationModifyMessage(message);
            else
                message = donationtext.Replace(message, "");

            // send confirmations
            if (emailSubject != "DO NOT SEND")
            {
                DbUtil.Db.Email(notify.FromEmail, p.person, Util.EmailAddressListFromString(p.fromemail),
                    emailSubject, message, false);
                Log("SentConfirmation");
            }
            // notify the staff
            DbUtil.Db.Email(Util.PickFirst(p.person.FromEmail, notify.FromEmail),
                NotifyIds, Header,
                $@"{p.person.Name} has registered for {Header}<br/>
            Feepaid for this registrant: {p.AmountToPay():C}<br/>
            Others in this registration session: {p.GetOthersInTransaction(Transaction)}<br/>
            Total Fee paid for this registration session: {ts?.TotPaid:C}<br/>
            <pre>{p.PrepareSummaryText()}</pre>");
        }