Exemple #1
0
 public void WriteXml(APIWriter w)
 {
     w.StartPending("TimeSlots");
     w.Attr("LockDays", TimeSlotLockDays);
     foreach (var c in list)
     {
         w.Start("Slot")
         .Attr("Time", c.Time.ToString2("t"))
         .Attr("DayOfWeek", c.DayOfWeek)
         .Attr("Limit", c.Limit)
         .AddText(c.Description)
         .End();
     }
     w.EndPending();
 }
Exemple #2
0
        public void WriteXmlMessages(XmlWriter writer, Messages messages)
        {
            var w = new APIWriter(writer);

            w.Start("Messages");
            w.Attr("id", OrgId);
            w.AddComment($"{Util.UserPeopleId} {Util.Now:g}");

            if (messages.Confirmation)
            {
                w.Start("Confirmation")
                .Add("Subject", Subject)
                .AddCdata("Body", Body)
                .End();
            }

            if (messages.Reminder)
            {
                w.Start("Reminder")
                .Add("Subject", ReminderSubject)
                .AddCdata("Body", ReminderBody)
                .End();
            }

            if (messages.Support)
            {
                w.Start("SupportEmail")
                .Add("Subject", SupportSubject)
                .AddCdata("Body", SupportBody)
                .End();
            }

            if (messages.Support)
            {
                w.Start("SenderEmail")
                .Add("Subject", SenderSubject)
                .AddCdata("Body", SenderBody)
                .End();
            }

            w.StartPending("Instructions");
            if (messages.Login)
            {
                w.AddCdata("Login", InstructionLogin);
            }
            if (messages.Select)
            {
                w.AddCdata("Select", InstructionSelect);
            }
            if (messages.Find)
            {
                w.AddCdata("Find", InstructionFind);
            }
            if (messages.Options)
            {
                w.AddCdata("Options", InstructionOptions);
            }
            if (messages.Special)
            {
                w.AddCdata("Special", InstructionSpecial);
            }
            if (messages.Submit)
            {
                w.AddCdata("Submit", InstructionSubmit);
            }
            if (messages.Sorry)
            {
                w.AddCdata("Sorry", InstructionSorry);
            }
            w.EndPending();

            w.End();
        }
Exemple #3
0
        public void WriteXml(XmlWriter writer)
        {
            var w = new APIWriter(writer);

            w.Attr("id", OrgId);
            w.AddComment($"{Util.UserPeopleId} {Util.Now:g}");

            w.StartPending("Confirmation")
            .Add("Subject", Subject)
            .AddCdata("Body", Body)
            .EndPending();

            w.StartPending("Reminder")
            .Add("Subject", ReminderSubject)
            .AddCdata("Body", ReminderBody)
            .EndPending();

            w.StartPending("SupportEmail")
            .Add("Subject", SupportSubject)
            .AddCdata("Body", SupportBody)
            .EndPending();

            w.StartPending("SenderEmail")
            .Add("Subject", SenderSubject)
            .AddCdata("Body", SenderBody)
            .EndPending();

            w.StartPending("Fees")
            .Add("Fee", Fee)
            .Add("Deposit", Deposit)
            .Add("ExtraFee", ExtraFee)
            .Add("MaximumFee", MaximumFee)
            .Add("ExtraValueFeeName", ExtraValueFeeName)
            .Add("AccountingCode", AccountingCode)
            .Add("PushpayFundName", PushpayFundName)
            .AddIfTrue("ApplyMaxToOtherFees", ApplyMaxToOtherFees)
            .AddIfTrue("IncludeOtherFeesWithDeposit", IncludeOtherFeesWithDeposit)
            .AddIfTrue("OtherFeesAddedToOrgFee", OtherFeesAddedToOrgFee)
            .AddIfTrue("AskDonation", AskDonation)
            .Add("DonationLabel", DonationLabel)
            .Add("DonationFundId", DonationFundId)
            .EndPending();


            w.StartPending("OrgFees");
            foreach (var i in OrgFees)
            {
                w.Start("Fee")
                .Attr("OrgId", i.OrgId)
                .Attr("Fee", i.Fee)
                .End();
            }
            w.EndPending();


            w.StartPending("AgeGroups");
            foreach (var i in AgeGroups)
            {
                w.Start("Group")
                .Attr("StartAge", i.StartAge)
                .Attr("EndAge", i.EndAge)
                .Attr("Fee", i.Fee)
                .AddText(i.SmallGroup)
                .End();
            }
            w.EndPending();

            w.StartPending("Instructions")
            .AddCdata("Login", InstructionLogin)
            .AddCdata("Select", InstructionSelect)
            .AddCdata("Find", InstructionFind)
            .AddCdata("Options", InstructionOptions)
            .AddCdata("Special", InstructionSpecial)
            .AddCdata("Submit", InstructionSubmit)
            .AddCdata("Sorry", InstructionSorry)
            .AddCdata("Thanks", ThankYouMessage)
            .AddCdata("Terms", Terms)
            .EndPending();

            w.StartPending("Options")
            .AddCdata("ConfirmationTrackingCode", ConfirmationTrackingCode)
            .Add("ValidateOrgs", ValidateOrgs)
            .Add("Shell", Shell)
            .Add("ShellBs", ShellBs)
            .Add("FinishRegistrationButton", FinishRegistrationButton)
            .Add("SpecialScript", SpecialScript)
            .Add("OnEnrollScript", OnEnrollScript)
            .Add("GroupToJoin", GroupToJoin)
            .Add("TimeOut", TimeOut)
            .AddIfTrue("AllowOnlyOne", AllowOnlyOne)
            .AddIfTrue("TargetExtraValues", TargetExtraValues)
            .AddIfTrue("AllowReRegister", AllowReRegister)
            .AddIfTrue("AllowSaveProgress", AllowSaveProgress)
            .AddIfTrue("MemberOnly", MemberOnly)
            .AddIfTrue("AddAsProspect", AddAsProspect)
            .AddIfTrue("DisallowAnonymous", DisallowAnonymous)
            .EndPending();

            w.StartPending("NotRequired")
            .AddIfTrue("NoReqBirthYear", NoReqBirthYear)
            .AddIfTrue("NotReqDOB", NotReqDOB)
            .AddIfTrue("NotReqAddr", NotReqAddr)
            .AddIfTrue("NotReqZip", NotReqZip)
            .AddIfTrue("NotReqPhone", NotReqPhone)
            .AddIfTrue("NotReqGender", NotReqGender)
            .AddIfTrue("NotReqMarital", NotReqMarital)
            .AddIfTrue("NotReqCampus", NotReqCampus)
            .AddIfTrue("ShowDOBOnFind", ShowDOBOnFind)
            .AddIfTrue("ShowPhoneOnFind", ShowPhoneOnFind)
            .EndPending();

            TimeSlots?.WriteXml(w);

            w.StartPending("AskItems");
            foreach (var a in AskItems)
            {
                a.WriteXml(w);
            }
            w.EndPending();
        }