Ejemplo n.º 1
0
        public static IEnumerable <SelectListItem> RegistrationTypeIds()
        {
            var list = new List <SelectListItem>();
            var spec = new Dictionary <int, string>
            {
                { RegClass.NotSpecified, "(Not Specified)" },
                { RegClass.Active, "(Active Registration)" },
                { RegClass.OnApp, "(Any Reg on App)" },
                { RegClass.NotOnApp, "(Any Reg not on App)" },
                { RegClass.MasterOrStandalone, "(Master or StandAlone Reg)" },
                { RegClass.AnyRegistration, "(Any Registration)" },
                { RegClass.ChildOfMaster, "(Child of Master Reg)" },
                { RegClass.Standalone, "(StandAlone reg)" }
            };

            list.AddRange(spec.Select(dd => new SelectListItem {
                Value = dd.Key.ToString(), Text = dd.Value
            }));

            var codes = RegistrationTypeCode.GetCodePairs();

            list.AddRange(codes.Select(dd => new SelectListItem {
                Value = dd.Key.ToString(), Text = dd.Value
            }));

            list.Add(new SelectListItem {
                Value = RegClass.MissionTrip.ToString(), Text = "Mission Trip"
            });

            return(list);
        }
Ejemplo n.º 2
0
        public IEnumerable <CodeValueItem> RegistrationTypes99()
        {
            var list = (from i in RegistrationTypeCode.GetCodePairs()
                        select new CodeValueItem
            {
                Id = i.Key,
                Code = i.Key.ToString(),
                Value = i.Value
            }).ToList();

            list.Insert(0, new CodeValueItem {
                Id = 99, Code = "99", Value = "(not specified)"
            });
            return(list);
        }
Ejemplo n.º 3
0
        public IEnumerable <CodeValueItem> RegistrationTypes()
        {
            var q = RegistrationTypeCode.GetCodePairs();

            if (!HttpContextFactory.Current.User.IsInRole("Developer"))
            {
                q = q.Where(pp => pp.Key != RegistrationTypeCode.RegisterLinkMaster);
            }
            return(from i in q
                   select new CodeValueItem
            {
                Id = i.Key,
                Code = i.Key.ToString(),
                Value = i.Value
            });
        }
Ejemplo n.º 4
0
        public static IEnumerable <SelectListItem> RegistrationTypeIds()
        {
            var q = from o in RegistrationTypeCode.GetCodePairs()
                    select new SelectListItem
            {
                Value = o.Key.ToString(),
                Text  = o.Value
            };
            var list = q.ToList();

            list.Insert(0, new SelectListItem
            {
                Value = RegistrationClassification.AnyOnlineRegOnApp94.ToString(),
                Text  = "(any reg on app)"
            });
            list.Insert(0, new SelectListItem
            {
                Value = RegistrationClassification.AnyOnlineRegNotOnApp95.ToString(),
                Text  = "(active reg not on app)"
            });
            list.Insert(0, new SelectListItem
            {
                Value = RegistrationClassification.AnyOnlineRegActive96.ToString(),
                Text  = "(active registration)"
            });
            list.Insert(0, new SelectListItem
            {
                Value = RegistrationClassification.AnyOnlineRegNonPicklist97.ToString(),
                Text  = "(registration, no picklist)"
            });
            list.Insert(0, new SelectListItem
            {
                Value = RegistrationClassification.AnyOnlineReg99.ToString(),
                Text  = "(any registration)"
            });
            list.Insert(0, new SelectListItem
            {
                Value = "-1",
                Text  = "(not specified)"
            });
            list.Add(new SelectListItem
            {
                Value = RegistrationClassification.AnyOnlineRegMissionTrip98.ToString(),
                Text  = "Mission Trip"
            });
            return(list);
        }