Exemple #1
0
 public IEnumerable<TitleItems> FetchTitleItems()
 {
     var Model = new CodeValueModel();
     return new List<TitleItems>
     {
         new TitleItems { title = "Approval Codes", Instructions = "(negative to remove, 0 to remove all)", items = Model.VolunteerCodes() },
         new TitleItems { title = "Baptism Status Codes", items = Model.BaptismStatusList() },
         new TitleItems { title = "Baptism Type Codes", items = Model.BaptismTypeList() },
         new TitleItems { title = "Campus Codes", items = Model.AllCampuses() },
         new TitleItems { title = "Contribution Statement Options", items = Model.EnvelopeOptionList() },
         new TitleItems { title = "Decision Type Codes", items = Model.DecisionTypeList() },
         new TitleItems { title = "Drop Type Codes", items = Model.DropTypeList() },
         new TitleItems { title = "Envelope Options", items = Model.EnvelopeOptionList() },
         new TitleItems { title = "Entry Point Codes", items = Model.EntryPoints() },
         new TitleItems { title = "Family Position Codes", items = Model.FamilyPositionCodes() },
         new TitleItems { title = "Gender Codes", items = Model.GenderCodes() },
         new TitleItems { title = "Grades", items = Grades(), UseCode = true},
         new TitleItems { title = "Join Type Codes", items = Model.JoinTypeList() },
         new TitleItems { title = "Marital Status Codes", items = Model.MaritalStatusCodes() },
         new TitleItems { title = "Member Status Codes", items = Model.MemberStatusCodes() },
         new TitleItems { title = "New Member Class", items = Model.NewMemberClassStatusList() },
         new TitleItems { title = "Receive SMS", items = ReceiveSMS(), UseCode = true},
     };
 }
 public static IEnumerable<CodeValueItem> Fetch(string field, ref bool useCode)
 {
     IEnumerable<CodeValueItem> m = null;
     var lookups = new CodeValueModel();
     switch (field)
     {
         case "Approval Codes":
             m = lookups.VolunteerCodes();
             break;
         case "Baptism Status":
             m = lookups.BaptismStatusList();
             break;
         case "Baptism Type":
             m = lookups.BaptismTypeList();
             break;
         case "Bad Address Flag":
             m = UpdateFieldsModel.BadAddressFlag();
             useCode = true;
             break;
         case "Campus":
             m = lookups.AllCampuses();
             break;
         case "Statement Options":
             m = lookups.EnvelopeOptionList();
             break;
         case "Electronic Statement":
             m = UpdateFieldsModel.ElectronicStatement();
             useCode = true;
             break;
         case "Decision Type":
             m = lookups.DecisionTypeList();
             break;
         case "Do Not Mail":
             m = UpdateFieldsModel.DoNotMail();
             useCode = true;
             break;
         case "Drop Type":
             m = lookups.DropTypeList();
             break;
         case "Envelope Options":
             m = lookups.EnvelopeOptionList();
             break;
         case "Entry Point":
             m = lookups.EntryPoints();
             useCode = false;
             break;
         case "Family Position":
             m = lookups.FamilyPositionCodes();
             break;
         case "Gender":
             m = lookups.GenderCodes();
             break;
         case "Grade":
             m = UpdateFieldsModel.Grades();
             useCode = true;
             break;
         case "Join Type":
             m = lookups.JoinTypeList();
             break;
         case "Marital Status":
             m = lookups.MaritalStatusCodes();
             break;
         case "Member Status":
             m = lookups.MemberStatusCodes();
             break;
         case "New Member Class":
             m = lookups.NewMemberClassStatusList();
             break;
         case "ReceiveSMS":
             m = UpdateFieldsModel.ReceiveSMS();
             useCode = true;
             break;
     }
     return m;
 }