예제 #1
0
        public static AskSize Parse(Parser parser)
        {
            var r = new AskSize();

            parser.lineno++;
            r.Label = parser.GetLabel("Size");
            if (parser.curr.kw == Parser.RegKeywords.Fee)
            {
                r.Fee = parser.GetDecimal();
            }
            if (parser.curr.kw == Parser.RegKeywords.AllowLastYear)
            {
                r.AllowLastYear = parser.GetBool();
            }
            r.list = new List <Size>();
            if (parser.curr.indent == 0)
            {
                return(r);
            }
            var startindent = parser.curr.indent;

            while (parser.curr.indent == startindent)
            {
                var m = Size.Parse(parser, startindent);
                r.list.Add(m);
            }
            var q = r.list.GroupBy(mi => mi.SmallGroup).Where(g => g.Count() > 1).Select(g => g.Key).ToList();

            if (q.Any())
            {
                throw parser.GetException("Duplicate SmallGroup in Sizes: " + string.Join(",", q));
            }
            return(r);
        }
예제 #2
0
파일: Ask.cs 프로젝트: rastographics/bvcms
        public static Ask ReadXml(XElement ele)
        {
            var ask = ele.Name.ToString();

            switch (ask)
            {
            case "AskCheckboxes":
                return(AskCheckboxes.ReadXml(ele));

            case "AskDropdown":
                return(AskDropdown.ReadXml(ele));

            case "AskExtraQuestions":
                return(AskExtraQuestions.ReadXml(ele));

            case "AskGradeOptions":
                return(AskGradeOptions.ReadXml(ele));

            case "AskHeader":
                return(AskHeader.ReadXml(ele));

            case "AskInstruction":
                return(AskInstruction.ReadXml(ele));

            case "AskMenu":
                return(AskMenu.ReadXml(ele));

            case "AskRequest":
                return(AskRequest.ReadXml(ele));

            case "AskSize":
                return(AskSize.ReadXml(ele));

            case "AskSuggestedFee":
                return(AskSuggestedFee.ReadXml(ele));

            case "AskText":
                return(AskText.ReadXml(ele));

            case "AskTickets":
                return(AskTickets.ReadXml(ele));

            case "AskYesNoQuestions":
                return(AskYesNoQuestions.ReadXml(ele));

            case "AskDocuments":
                return(AskDocuments.ReadXml(ele));

            default:
                return(new Ask(ask));
            }
        }
예제 #3
0
파일: AskSize.cs 프로젝트: stevesloka/bvcms
 public void Output(StringBuilder sb, AskSize ask)
 {
     AddValueNoCk(0, sb, "AskSize", "");
     AddValueCk(1, sb, "Label", ask.Label ?? "Size");
     AddValueCk(1, sb, "Fee", ask.Fee);
     AddValueCk(1, sb, "AllowLastYear", ask.AllowLastYear);
     foreach (var q in ask.list)
     {
         AddValueCk(1, sb, q.Description);
         AddValueCk(2, sb, "SmallGroup", q.SmallGroup ?? q.Description);
     }
     sb.AppendLine();
 }
예제 #4
0
파일: AskSize.cs 프로젝트: GSBCfamily/bvcms
		public new static AskSize ReadXml(XElement e)
		{
		    var r = new AskSize
		    {
		        Label = e.Element("Label")?.Value,
		        Fee = e.Attribute("Fee")?.Value.ToDecimal(),
		        AllowLastYear = e.Attribute("AllowLastYear")?.Value.ToBool2() ?? false,
		        list = new List<Size>()
		    };
		    foreach (var ee in e.Elements("Size"))
		        r.list.Add(Size.ReadXml(ee));
            // todo: check duplicates
			return r;
		}
예제 #5
0
        public new static AskSize ReadXml(XElement e)
        {
            var r = new AskSize
            {
                Label         = e.Element("Label")?.Value,
                Fee           = e.Attribute("Fee")?.Value.ToDecimal(),
                AllowLastYear = e.Attribute("AllowLastYear")?.Value.ToBool2() ?? false,
                list          = new List <Size>()
            };

            foreach (var ee in e.Elements("Size"))
            {
                r.list.Add(Size.ReadXml(ee));
            }
            // todo: check duplicates
            return(r);
        }
예제 #6
0
파일: AskSize.cs 프로젝트: stevesloka/bvcms
 public AskSize ParseAskSize()
 {
     var r = new AskSize();
     lineno++;
     r.Label = GetLabel("Size");
     if (curr.kw == RegKeywords.Fee)
         r.Fee = GetDecimal();
     if (curr.kw == RegKeywords.AllowLastYear)
         r.AllowLastYear = GetBool();
     r.list = new List<AskSize.Size>();
     if (curr.indent == 0)
         return r;
     var startindent = curr.indent;
     while (curr.indent == startindent)
     {
         var i = new AskSize.Size();
         if (curr.kw != RegKeywords.None)
             throw GetException("unexpected line in Size");
         i.Description = GetLine();
         i.SmallGroup = i.Description;
         if (curr.indent <= startindent)
         {
             r.list.Add(i);
             continue;
         }
         var ind = curr.indent;
         while (curr.indent == ind)
         {
             if (curr.kw != Parser.RegKeywords.SmallGroup)
                 throw GetException("unexpected line in Size");
             i.SmallGroup = GetString(i.Description);
         }
         r.list.Add(i);
     }
     var q = r.list.GroupBy(mi => mi.SmallGroup).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
     if (q.Any())
         throw GetException("Duplicate SmallGroup in Sizes: " + string.Join(",", q));
     return r;
 }
예제 #7
0
파일: AskSize.cs 프로젝트: rossspoon/bvcms
 public static AskSize Parse(Parser parser)
 {
     var r = new AskSize();
     parser.lineno++;
     r.Label = parser.GetLabel("Size");
     if (parser.curr.kw == Parser.RegKeywords.Fee)
         r.Fee = parser.GetDecimal();
     if (parser.curr.kw == Parser.RegKeywords.AllowLastYear)
         r.AllowLastYear = parser.GetBool();
     r.list = new List<Size>();
     if (parser.curr.indent == 0)
         return r;
     var startindent = parser.curr.indent;
     while (parser.curr.indent == startindent)
     {
         var m = Size.Parse(parser, startindent);
         r.list.Add(m);
     }
     var q = r.list.GroupBy(mi => mi.SmallGroup).Where(g => g.Count() > 1).Select(g => g.Key).ToList();
     if (q.Any())
         throw parser.GetException("Duplicate SmallGroup in Sizes: " + string.Join(",", q));
     return r;
 }
예제 #8
0
        void ParseSection()
        {
            switch (curr.kw)
            {
                case RegKeywords.AskParents:
                case RegKeywords.AnswersNotRequired:
                case RegKeywords.AskSMS:
                case RegKeywords.AskDoctor:
                case RegKeywords.AskInsurance:
                case RegKeywords.AskEmContact:
                case RegKeywords.AskAllergies:
                case RegKeywords.AskChurch:
                case RegKeywords.AskTylenolEtc:
                case RegKeywords.AskCoaching:
                    set.AskItems.Add(ParseAsk());
                    break;
                case RegKeywords.SpecialScript:
                    set.SpecialScript = GetString();
                    break;
                case RegKeywords.AskSuggestedFee:
                    set.AskItems.Add(ParseAskSuggestedFee());
                    break;
                case RegKeywords.AskTickets:
                    set.AskItems.Add(ParseAskTickets());
                    break;
                case RegKeywords.AskRequest:
                    set.AskItems.Add(ParseAskRequest());
                    break;
                case RegKeywords.AskHeader:
                    set.AskItems.Add(ParseAskHeader());
                    break;
                case RegKeywords.AskInstruction:
                    set.AskItems.Add(ParseAskInstruction());
                    break;
                case RegKeywords.Dropdown:
                case RegKeywords.AskOptions:
                case RegKeywords.ExtraOptions:
                case RegKeywords.Dropdown1:
                case RegKeywords.Dropdown2:
                case RegKeywords.Dropdown3:
                    set.AskItems.Add(ParseAskDropdown());
                    break;
                case RegKeywords.MenuItems:
                    var m = ParseAskMenu();
                    if (m.list.Count > 0)
                        set.AskItems.Add(m);
                    break;
                case RegKeywords.ExtraQuestions:
                    set.AskItems.Add(ParseAskExtraQuestions());
                    break;
                case RegKeywords.Text:
                    set.AskItems.Add(ParseAskText());
                    break;
                case RegKeywords.Checkboxes:
                case RegKeywords.Checkboxes2:
                    set.AskItems.Add(ParseAskCheckboxes());
                    break;
                case RegKeywords.YesNoQuestions:
                    set.AskItems.Add(ParseAskYesNoQuestions());
                    break;
                case RegKeywords.AskGradeOptions:
                case RegKeywords.GradeOptions:
                    set.AskItems.Add(ParseAskGradeOptions());
                    break;
                case RegKeywords.AskSize:
                    asksize = ParseAskSize();
                    if (asksize.list.Count > 0)
                        set.AskItems.Add(asksize);
                    break;

                case RegKeywords.MemberOnly:
                    set.MemberOnly = GetBool();
                    break;
                case RegKeywords.AskMedical:
                    GetBool();
                    break;
                case RegKeywords.AskDonation:
                    set.AskDonation = GetBool();
                    break;
                case RegKeywords.NoReqBirthYear:
                    set.NoReqBirthYear = GetBool();
                    break;
                case RegKeywords.NotReqDOB:
                    set.NotReqDOB = GetBool();
                    break;
                case RegKeywords.NotReqAddr:
                    set.NotReqAddr = GetBool();
                    break;
                case RegKeywords.NotReqPhone:
                    set.NotReqPhone = GetBool();
                    break;
                case RegKeywords.NotReqGender:
                    set.NotReqGender = GetBool();
                    break;
                case RegKeywords.NotReqMarital:
                    set.NotReqMarital = GetBool();
                    break;
                case RegKeywords.NotReqZip:
                    set.NotReqZip = GetBool();
                    break;
                case RegKeywords.DonationFundId:
                    set.DonationFundId = GetNullInt();
                    break;
                case RegKeywords.AccountingCode:
                    set.AccountingCode = GetString();
                    break;
                case RegKeywords.DonationLabel:
                    set.DonationLabel = GetString();
                    break;
                case RegKeywords.ExtraValueFeeName:
                    set.ExtraValueFeeName = GetString();
                    break;
                case RegKeywords.GroupToJoin:
                    set.GroupToJoin = GetString();
                    break;
                case RegKeywords.AddAsProspect:
                    set.AddAsProspect = GetBool();
                    break;
                case RegKeywords.LinkGroupsFromOrgs:
                    set.LinkGroupsFromOrgs = (from i in curr.value.Split(',')
                                              where i.ToInt() > 0
                                              select i.ToInt()).ToList();
                    lineno++;
                    break;
                case RegKeywords.ValidateOrgs:
                    set.ValidateOrgs = curr.value;
                    lineno++;
                    break;
                case RegKeywords.Terms:
                    ParseTerms();
                    break;
                case RegKeywords.Instructions:
                    ParseInstructions();
                    break;
                case RegKeywords.Confirmation:
                    ParseConfirmation();
                    break;
                case RegKeywords.ConfirmationTrackingCode:
                    ParseTrackingCode();
                    break;
                case RegKeywords.Reminder:
                    ParseReminder();
                    break;
                case RegKeywords.SupportEmail:
                    ParseSupport();
                    break;
                case RegKeywords.SenderEmail:
                    ParseSender();
                    break;
                case RegKeywords.AgeGroups:
                    ParseAgeGroups();
                    break;
                case RegKeywords.OrgMemberFees:
                case RegKeywords.OrgFees:
                    ParseOrgFees();
                    break;
                case RegKeywords.VoteTags:
                    ParseVoteTags();
                    break;
                case RegKeywords.Shell:
                    set.Shell = GetString();
                    break;
                case RegKeywords.ShellBs:
                    set.ShellBs = GetString();
                    break;
                case RegKeywords.Fee:
                    set.Fee = GetDecimal();
                    break;
                case RegKeywords.TimeOut:
                    set.TimeOut = GetNullInt();
                    break;
                case RegKeywords.DisallowAnonymous:
                    set.DisallowAnonymous = GetBool();
                    break;
                case RegKeywords.FinishRegistrationButton:
                    set.FinishRegistrationButton = GetString();
                    break;

                // BEGIN support for old Registration Documents
                case RegKeywords.Title:
                    GetString();
                    break;
                case RegKeywords.GiveOrgMembAccess:
                    GetBool();
                    break;
                case RegKeywords.UseBootstrap:
                    GetBool();
                    break;
                case RegKeywords.AskGrade:
                    GetBool();
                    GetLabel("Grade");
                    break;

                case RegKeywords.AskShirtSize:
                    GetBool();
                    asksize = new AskSize { Label = "Size" };
                    set.AskItems.Add(asksize);
                    break;
                case RegKeywords.ShirtSizes:
                    asksize.list = ParseShirtSizes();
                    break;
                case RegKeywords.AllowLastYearShirt:
                    asksize.AllowLastYear = GetBool();
                    break;
                case RegKeywords.ShirtFee:
                    GetDecimal();
                    break;
                // END support for old Registration Documents

                case RegKeywords.Deposit:
                    set.Deposit = GetDecimal();
                    break;
                case RegKeywords.ExtraFee:
                    set.ExtraFee = GetDecimal();
                    break;
                case RegKeywords.MaximumFee:
                    set.MaximumFee = GetDecimal();
                    break;
                case RegKeywords.AllowOnlyOne:
                    set.AllowOnlyOne = GetBool();
                    break;
                case RegKeywords.OtherFeesAdded:
                case RegKeywords.OtherFeesAddedToOrgFee:
                    set.OtherFeesAddedToOrgFee = GetBool();
                    break;
                case RegKeywords.IncludeOtherFeesWithDeposit:
                    set.IncludeOtherFeesWithDeposit = GetBool();
                    break;
                case RegKeywords.ApplyMaxToOtherFees:
                    set.ApplyMaxToOtherFees = GetBool();
                    break;
                case RegKeywords.AllowReRegister:
                    set.AllowReRegister = GetBool();
                    break;
                case RegKeywords.AllowSaveProgress:
                    set.AllowSaveProgress = GetBool();
                    break;
                case RegKeywords.TargetExtraValues:
                    set.TargetExtraValues = GetBool();
                    break;
                case RegKeywords.TimeSlotLockDays:
                    set.TimeSlotLockDays = GetNullInt();
                    break;
                case RegKeywords.TimeSlots:
                    set.TimeSlots = ParseTimeSlots();
                    if (set.TimeSlotLockDays.HasValue)
                        set.TimeSlots.TimeSlotLockDays = set.TimeSlotLockDays;
                    break;
            }
        }
예제 #9
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;
            }
        }
예제 #10
0
파일: Settings.cs 프로젝트: rossspoon/bvcms
        void ParseSection(Parser parser)
        {
            switch (parser.curr.kw)
            {
                case Parser.RegKeywords.AskParents:
                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.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.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.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.GiveOrgMembAccess:
                    GiveOrgMembAccess = 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.Reminder:
                    ParseReminder(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.Fee:
                    Fee = parser.GetDecimal();
                    break;

            // BEGIN support for old Registration Documents
                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.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;
            }
        }