Ejemplo n.º 1
0
 public Settings()
 {
     OrgFees            = new OrgFees();
     TimeSlots          = new TimeSlots();
     AgeGroups          = new List <AgeGroup>();
     LinkGroupsFromOrgs = new List <int>();
     ValidateOrgs       = "";
     AskItems           = new List <Ask>();
 }
Ejemplo n.º 2
0
        private AskSize asksize; // To support old Registration Documents

        #endregion Fields

        #region Constructors

        public Settings()
        {
            OrgFees = new OrgFees();
            TimeSlots = new TimeSlots();
            AgeGroups = new List<AgeGroup>();
            LinkGroupsFromOrgs = new List<int>();
            ValidateOrgs = "";
            AskItems = new List<Ask>();
        }
Ejemplo n.º 3
0
 public static TimeSlots ReadXml(XElement e)
 {
     var TimeSlots = new TimeSlots();
     TimeSlots.TimeSlotLockDays = e.Attribute("LockDays")?.Value.ToInt2();
     foreach (var ele in e.Elements("Slot"))
         TimeSlots.list.Add(new TimeSlots.TimeSlot()
         {
             Time = ele.Attribute("Time")?.Value.ToDate(),
             DayOfWeek = ele.Attribute("DayOfWeek")?.Value.ToInt2() ?? 0,
             Limit = ele.Attribute("Limit")?.Value.ToInt2(),
             Description = ele.Value,
         });
     return TimeSlots;
 }
Ejemplo n.º 4
0
 public void Output(StringBuilder sb, TimeSlots ts)
 {
     if (ts.list.Count == 0)
         return;
     AddValueCk(0, sb, "TimeSlotLockDays", ts.TimeSlotLockDays);
     AddValueNoCk(0, sb, "TimeSlots", "");
     foreach (var c in ts.list)
     {
         AddValueCk(1, sb, c.Description);
         AddValueCk(2, sb, "Time", c.Time.ToString2("t"));
         AddValueCk(2, sb, "DayOfWeek", c.DayOfWeek);
         AddValueCk(2, sb, "Limit", c.Limit);
     }
     sb.AppendLine();
 }
Ejemplo n.º 5
0
 public static TimeSlots Parse(Parser parser)
 {
     var ts = new TimeSlots();
     ts.TimeSlotLockDays = parser.GetNullInt();
     ts.list = new List<TimeSlot>();
     if (parser.curr.indent == 0)
         return ts;
     var startindent = parser.curr.indent;
     while (parser.curr.indent == startindent)
     {
         var s = TimeSlot.Parse(parser, startindent);
         ts.list.Add(s);
     }
     return ts;
 }
Ejemplo n.º 6
0
        public override string ToString()
        {
            var sb = new StringBuilder();

            AddConfirmation(sb);
            AddReminder(sb);
            AddSupport(sb);
            AddSender(sb);
            AddFees(sb);
            AddValueCk(0, sb, "IncludeOtherFeesWithDeposit", IncludeOtherFeesWithDeposit);
            AddDonation(sb);
            AddAgeGroups(sb);
            OrgFees.Output(sb);
            AddValueCk(0, sb, "OtherFeesAddedToOrgFee", OtherFeesAddedToOrgFee);
            AddInstructions(sb);
            AddTerms(sb);
            AddTrackCode(sb);

            AddValueCk(0, sb, "Title", Title);
            AddValueCk(0, sb, "ValidateOrgs", ValidateOrgs);
            AddValueCk(0, sb, "Shell", Shell);
            AddValueCk(0, sb, "ShellBs", ShellBs);
            AddValueCk(0, sb, "SpecialScript", SpecialScript);
            AddValueCk(0, sb, "AllowOnlyOne", AllowOnlyOne);
            AddValueCk(0, sb, "TargetExtraValues", TargetExtraValues);
            AddValueCk(0, sb, "AllowReRegister", AllowReRegister);
            AddValueCk(0, sb, "AllowSaveProgress", AllowSaveProgress);
            AddValueCk(0, sb, "MemberOnly", MemberOnly);
            AddValueCk(0, sb, "GroupToJoin", GroupToJoin);
            AddValueCk(0, sb, "AddAsProspect", AddAsProspect);
            AddValueCk(0, sb, "NoReqBirthYear", NoReqBirthYear);
            AddValueCk(0, sb, "NotReqDOB", NotReqDOB);
            AddValueCk(0, sb, "NotReqAddr", NotReqAddr);
            AddValueCk(0, sb, "NotReqZip", NotReqZip);
            AddValueCk(0, sb, "NotReqPhone", NotReqPhone);
            AddValueCk(0, sb, "NotReqGender", NotReqGender);
            AddValueCk(0, sb, "NotReqMarital", NotReqMarital);

            TimeSlots.Output(sb);
            foreach (var a in AskItems)
            {
                a.Output(sb);
            }

            return(sb.ToString());
        }
Ejemplo n.º 7
0
        public static TimeSlots ReadXml(XElement e)
        {
            var TimeSlots = new TimeSlots();

            TimeSlots.TimeSlotLockDays = e.Attribute("LockDays")?.Value.ToInt2();
            foreach (var ele in e.Elements("Slot"))
            {
                TimeSlots.list.Add(new TimeSlots.TimeSlot()
                {
                    Time        = ele.Attribute("Time")?.Value.ToDate(),
                    DayOfWeek   = ele.Attribute("DayOfWeek")?.Value.ToInt2() ?? 0,
                    Limit       = ele.Attribute("Limit")?.Value.ToInt2(),
                    Description = ele.Value,
                });
            }
            return(TimeSlots);
        }
Ejemplo n.º 8
0
        public static TimeSlots Parse(Parser parser)
        {
            var ts = new TimeSlots();

            ts.TimeSlotLockDays = parser.GetNullInt();
            ts.list             = new List <TimeSlot>();
            if (parser.curr.indent == 0)
            {
                return(ts);
            }
            var startindent = parser.curr.indent;

            while (parser.curr.indent == startindent)
            {
                var s = TimeSlot.Parse(parser, startindent);
                ts.list.Add(s);
            }
            return(ts);
        }
Ejemplo n.º 9
0
 public TimeSlots ParseTimeSlots()
 {
     var ts = new TimeSlots();
     ts.TimeSlotLockDays = GetNullInt();
     if (curr.indent == 0)
         return ts;
     var startindent = curr.indent;
     while (curr.indent == startindent)
     {
         var slot = new TimeSlots.TimeSlot();
         if (curr.kw != Parser.RegKeywords.None)
             throw GetException("unexpected line in TimeSlots");
         slot.Description = GetLine();
         if (curr.indent <= startindent)
         {
             ts.list.Add(slot);
             continue;
         }
         var ind = curr.indent;
         while (curr.indent == ind)
         {
             switch (curr.kw)
             {
                 case Parser.RegKeywords.Time:
                     slot.Time = GetTime();
                     break;
                 case Parser.RegKeywords.DayOfWeek:
                     slot.DayOfWeek = GetInt();
                     break;
                 case Parser.RegKeywords.Limit:
                     slot.Limit = GetInt();
                     break;
                 default:
                     throw GetException("unexpected line in TimeSlot");
             }
         }
         ts.list.Add(slot);
     }
     return ts;
 }
Ejemplo n.º 10
0
        public void ReadXml(XmlReader reader)
        {
            var xd = XDocument.Load(reader);

            if (xd.Root == null)
            {
                return;
            }

            foreach (var e in xd.Root.Elements())
            {
                var name = e.Name.ToString();
                switch (name)
                {
                case "Confirmation":
                    Subject = e.Element("Subject")?.Value;
                    Body    = e.Element("Body")?.Value;
                    break;

                case "Reminder":
                    ReminderSubject = e.Element("Subject")?.Value;
                    ReminderBody    = e.Element("Body")?.Value;
                    break;

                case "SupportEmail":
                    SupportSubject = e.Element("Subject")?.Value;
                    SupportBody    = e.Element("Body")?.Value;
                    break;

                case "SenderEmail":
                    SenderSubject = e.Element("Subject")?.Value;
                    SenderBody    = e.Element("Body")?.Value;
                    break;

                case "Instructions":
                    InstructionLogin   = e.Element("Login")?.Value;
                    InstructionSelect  = e.Element("Select")?.Value;
                    InstructionFind    = e.Element("Find")?.Value;
                    InstructionOptions = e.Element("Options")?.Value;
                    InstructionSpecial = e.Element("Special")?.Value;
                    InstructionSubmit  = e.Element("Submit")?.Value;
                    InstructionSorry   = e.Element("Sorry")?.Value;
                    ThankYouMessage    = e.Element("Thanks")?.Value;
                    Terms = e.Element("Terms")?.Value;
                    break;

                case "Fees":
                    Fee                         = e.Element("Fee").ToDecimal();
                    Deposit                     = e.Element("Deposit").ToDecimal();
                    ExtraFee                    = e.Element("ExtraFee").ToDecimal();
                    MaximumFee                  = e.Element("MaximumFee").ToDecimal();
                    ApplyMaxToOtherFees         = e.Element("ApplyMaxToOtherFees").ToBool();
                    ExtraValueFeeName           = e.Element("ExtraValueFeeName")?.Value;
                    AccountingCode              = e.Element("AccountingCode")?.Value;
                    PushpayFundName             = e.Element("PushpayFundName")?.Value;
                    IncludeOtherFeesWithDeposit = e.Element("IncludeOtherFeesWithDeposit").ToBool();
                    OtherFeesAddedToOrgFee      = e.Element("OtherFeesAddedToOrgFee").ToBool();
                    AskDonation                 = e.Element("AskDonation").ToBool();
                    DonationLabel               = e.Element("DonationLabel")?.Value;
                    DonationFundId              = e.Element("DonationFundId").ToInt2();
                    break;

                case "AgeGroups":
                    if (AgeGroups == null)
                    {
                        AgeGroups = new List <AgeGroup>();
                    }
                    foreach (var ee in e.Elements("Group"))
                    {
                        AgeGroups.Add(new AgeGroup
                        {
                            StartAge   = ee.Attribute("StartAge").ToInt2() ?? 0,
                            EndAge     = ee.Attribute("EndAge").ToInt2() ?? 0,
                            Fee        = ee.Attribute("Fee").ToDecimal(),
                            SmallGroup = ee.Value
                        });
                    }
                    break;

                case "OrgFees":
                    if (OrgFees == null)
                    {
                        OrgFees = new List <OrgFee>();
                    }
                    foreach (var ee in e.Elements("Fee"))
                    {
                        OrgFees.Add(new OrgFee
                        {
                            OrgId = ee.Attribute("OrgId").ToInt2(),
                            Fee   = ee.Attribute("Fee").ToDecimal()
                        });
                    }
                    break;

                case "Options":
                    ConfirmationTrackingCode = e.Element("ConfirmationTrackingCode")?.Value;
                    ValidateOrgs             = e.Element("ValidateOrgs")?.Value;
                    Shell   = e.Element("Shell")?.Value;
                    ShellBs = e.Element("ShellBs")?.Value;
                    FinishRegistrationButton = e.Element("FinishRegistrationButton")?.Value;
                    SpecialScript            = e.Element("SpecialScript")?.Value;
                    OnEnrollScript           = e.Element("OnEnrollScript")?.Value;
                    GroupToJoin       = e.Element("GroupToJoin")?.Value;
                    TimeOut           = e.Element("TimeOut").ToInt2();
                    AllowOnlyOne      = e.Element("AllowOnlyOne").ToBool();
                    TargetExtraValues = e.Element("TargetExtraValues").ToBool();
                    AllowReRegister   = e.Element("AllowReRegister").ToBool();
                    AllowSaveProgress = e.Element("AllowSaveProgress").ToBool();
                    MemberOnly        = e.Element("MemberOnly").ToBool();
                    AddAsProspect     = e.Element("AddAsProspect").ToBool();
                    DisallowAnonymous = e.Element("DisallowAnonymous").ToBool();
                    break;

                case "NotRequired":
                    NoReqBirthYear  = e.Element("NoReqBirthYear").ToBool();
                    NotReqDOB       = e.Element("NotReqDOB").ToBool();
                    NotReqAddr      = e.Element("NotReqAddr").ToBool();
                    NotReqZip       = e.Element("NotReqZip").ToBool();
                    NotReqPhone     = e.Element("NotReqPhone").ToBool();
                    NotReqGender    = e.Element("NotReqGender").ToBool();
                    NotReqMarital   = e.Element("NotReqMarital").ToBool();
                    NotReqCampus    = e.Element("NotReqCampus").ToBool();
                    ShowDOBOnFind   = e.Element("ShowDOBOnFind").ToBool();
                    ShowPhoneOnFind = e.Element("ShowPhoneOnFind").ToBool();
                    break;

                case "TimeSlots":
                    TimeSlots = TimeSlots.ReadXml(e);
                    if (TimeSlots.TimeSlotLockDays.HasValue)
                    {
                        TimeSlotLockDays = TimeSlots.TimeSlotLockDays;
                    }
                    break;

                case "AskItems":
                    foreach (var ele in e.Elements())
                    {
                        AskItems.Add(Ask.ReadXml(ele));
                    }
                    break;
                }
            }
            SetUniqueIds("AskDropdown");
            SetUniqueIds("AskExtraQuestions");
            SetUniqueIds("AskCheckboxes");
            SetUniqueIds("AskText");
            SetUniqueIds("AskMenu");
        }
Ejemplo n.º 11
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();
        }
Ejemplo n.º 12
0
        private AskSize asksize;         // To support old Registration Documents

        void ParseSection(Parser parser)
        {
            switch (parser.curr.kw)
            {
            case Parser.RegKeywords.AskParents:
            case Parser.RegKeywords.AnswersNotRequired:
            case Parser.RegKeywords.AskSMS:
            case Parser.RegKeywords.AskDoctor:
            case Parser.RegKeywords.AskInsurance:
            case Parser.RegKeywords.AskEmContact:
            case Parser.RegKeywords.AskAllergies:
            case Parser.RegKeywords.AskChurch:
            case Parser.RegKeywords.AskTylenolEtc:
            case Parser.RegKeywords.AskCoaching:
                AskItems.Add(Ask.ParseAsk(parser));
                break;

            case Parser.RegKeywords.SpecialScript:
                SpecialScript = parser.GetString();
                break;

            case Parser.RegKeywords.AskSuggestedFee:
                AskItems.Add(AskSuggestedFee.Parse(parser));
                break;

            case Parser.RegKeywords.AskTickets:
                AskItems.Add(AskTickets.Parse(parser));
                break;

            case Parser.RegKeywords.AskRequest:
                AskItems.Add(AskRequest.Parse(parser));
                break;

            case Parser.RegKeywords.AskHeader:
                AskItems.Add(AskHeader.Parse(parser));
                break;

            case Parser.RegKeywords.AskInstruction:
                AskItems.Add(AskInstruction.Parse(parser));
                break;

            case Parser.RegKeywords.Dropdown:
            case Parser.RegKeywords.AskOptions:
            case Parser.RegKeywords.ExtraOptions:
            case Parser.RegKeywords.Dropdown1:
            case Parser.RegKeywords.Dropdown2:
            case Parser.RegKeywords.Dropdown3:
                AskItems.Add(AskDropdown.Parse(parser));
                break;

            case Parser.RegKeywords.MenuItems:
                AskItems.Add(AskMenu.Parse(parser));
                break;

            case Parser.RegKeywords.ExtraQuestions:
                AskItems.Add(AskExtraQuestions.Parse(parser));
                break;

            case Parser.RegKeywords.Text:
                AskItems.Add(AskText.Parse(parser));
                break;

            case Parser.RegKeywords.Checkboxes:
            case Parser.RegKeywords.Checkboxes2:
                AskItems.Add(AskCheckboxes.Parse(parser));
                break;

            case Parser.RegKeywords.YesNoQuestions:
                AskItems.Add(AskYesNoQuestions.Parse(parser));
                break;

            case Parser.RegKeywords.AskGradeOptions:
            case Parser.RegKeywords.GradeOptions:
                AskItems.Add(AskGradeOptions.Parse(parser));
                break;

            case Parser.RegKeywords.AskSize:
                AskItems.Add(AskSize.Parse(parser));
                break;

            case Parser.RegKeywords.MemberOnly:
                MemberOnly = parser.GetBool();
                break;

            case Parser.RegKeywords.AskMedical:
                parser.GetBool();
                break;

            case Parser.RegKeywords.AskDonation:
                AskDonation = parser.GetBool();
                break;

            case Parser.RegKeywords.NoReqBirthYear:
                NoReqBirthYear = parser.GetBool();
                break;

            case Parser.RegKeywords.NotReqDOB:
                NotReqDOB = parser.GetBool();
                break;

            case Parser.RegKeywords.NotReqAddr:
                NotReqAddr = parser.GetBool();
                break;

            case Parser.RegKeywords.NotReqPhone:
                NotReqPhone = parser.GetBool();
                break;

            case Parser.RegKeywords.NotReqGender:
                NotReqGender = parser.GetBool();
                break;

            case Parser.RegKeywords.NotReqMarital:
                NotReqMarital = parser.GetBool();
                break;

            case Parser.RegKeywords.NotReqZip:
                NotReqZip = parser.GetBool();
                break;

            case Parser.RegKeywords.DonationFundId:
                DonationFundId = parser.GetNullInt();
                break;

            case Parser.RegKeywords.AccountingCode:
                AccountingCode = parser.GetString();
                break;

            case Parser.RegKeywords.DonationLabel:
                DonationLabel = parser.GetString();
                break;

            case Parser.RegKeywords.ExtraValueFeeName:
                ExtraValueFeeName = parser.GetString();
                break;

            case Parser.RegKeywords.GroupToJoin:
                GroupToJoin = parser.GetString();
                break;

            case Parser.RegKeywords.AddAsProspect:
                AddAsProspect = parser.GetBool();
                break;

            case Parser.RegKeywords.LinkGroupsFromOrgs:
                LinkGroupsFromOrgs = (from i in parser.curr.value.Split(',')
                                      where i.ToInt() > 0
                                      select i.ToInt()).ToList();
                parser.lineno++;
                break;

            case Parser.RegKeywords.ValidateOrgs:
                ValidateOrgs = parser.curr.value;
                parser.lineno++;
                break;

            case Parser.RegKeywords.Terms:
                ParseTerms(parser);
                break;

            case Parser.RegKeywords.Instructions:
                ParseInstructions(parser);
                break;

            case Parser.RegKeywords.Confirmation:
                ParseConfirmation(parser);
                break;

            case Parser.RegKeywords.ConfirmationTrackingCode:
                ParseTrackingCode(parser);
                break;

            case Parser.RegKeywords.Reminder:
                ParseReminder(parser);
                break;

            case Parser.RegKeywords.SupportEmail:
                ParseSupport(parser);
                break;

            case Parser.RegKeywords.SenderEmail:
                ParseSender(parser);
                break;

            case Parser.RegKeywords.AgeGroups:
                ParseAgeGroups(parser);
                break;

            case Parser.RegKeywords.OrgMemberFees:
            case Parser.RegKeywords.OrgFees:
                OrgFees = OrgFees.Parse(parser);
                break;

            case Parser.RegKeywords.VoteTags:
                ParseVoteTags(parser);
                break;

            case Parser.RegKeywords.Title:
                Title = parser.GetString();
                break;

            case Parser.RegKeywords.Shell:
                Shell = parser.GetString();
                break;

            case Parser.RegKeywords.ShellBs:
                ShellBs = parser.GetString();
                break;

            case Parser.RegKeywords.Fee:
                Fee = parser.GetDecimal();
                break;


// BEGIN support for old Registration Documents
            case Parser.RegKeywords.GiveOrgMembAccess:
                parser.GetBool();
                break;

            case Parser.RegKeywords.UseBootstrap:
                parser.GetBool();
                break;

            case Parser.RegKeywords.AskGrade:
                parser.GetBool();
                parser.GetLabel("Grade");
                break;

            case Parser.RegKeywords.AskShirtSize:
                parser.GetBool();
                asksize = new AskSize();
                AskItems.Add(asksize);
                break;

            case Parser.RegKeywords.ShirtSizes:
                asksize.list = AskSize.ParseShirtSizes(parser);
                break;

            case Parser.RegKeywords.AllowLastYearShirt:
                asksize.AllowLastYear = parser.GetBool();
                break;

            case Parser.RegKeywords.ShirtFee:
                if (asksize == null)
                {
                    asksize = new AskSize();
                    AskItems.Add(asksize);
                }
                asksize.Fee = parser.GetDecimal();
                break;
// END support for old Registration Documents

            case Parser.RegKeywords.Deposit:
                Deposit = parser.GetDecimal();
                break;

            case Parser.RegKeywords.ExtraFee:
                ExtraFee = parser.GetDecimal();
                break;

            case Parser.RegKeywords.MaximumFee:
                MaximumFee = parser.GetDecimal();
                break;

            case Parser.RegKeywords.AllowOnlyOne:
                AllowOnlyOne = parser.GetBool();
                break;

            case Parser.RegKeywords.OtherFeesAdded:
            case Parser.RegKeywords.OtherFeesAddedToOrgFee:
                OtherFeesAddedToOrgFee = parser.GetBool();
                break;

            case Parser.RegKeywords.IncludeOtherFeesWithDeposit:
                IncludeOtherFeesWithDeposit = parser.GetBool();
                break;

            case Parser.RegKeywords.ApplyMaxToOtherFees:
                ApplyMaxToOtherFees = parser.GetBool();
                break;

            case Parser.RegKeywords.AllowReRegister:
                AllowReRegister = parser.GetBool();
                break;

            case Parser.RegKeywords.AllowSaveProgress:
                AllowSaveProgress = parser.GetBool();
                break;

            case Parser.RegKeywords.TargetExtraValues:
                TargetExtraValues = parser.GetBool();
                break;

            case Parser.RegKeywords.TimeSlotLockDays:
                TimeSlotLockDays = parser.GetNullInt();
                break;

            case Parser.RegKeywords.TimeSlots:
                TimeSlots = TimeSlots.Parse(parser);
                if (TimeSlotLockDays.HasValue)
                {
                    TimeSlots.TimeSlotLockDays = TimeSlotLockDays;
                }
                break;
            }
        }