Beispiel #1
0
        public static SelectList GetChannelDropDown()
        {
            List<DropDownModelInt> list = new List<DropDownModelInt>();
            List<Channel> channels = Provider.GetChannels();

            foreach (Channel channel in channels)
            {
                //TODO: Make Channel A a string constant
                if (channel.ChannelName != "Channel A")
                {
                    DropDownModelInt model = new DropDownModelInt();

                    model.Text = channel.ChannelName;
                    model.Value = channel.ChannelId;

                    list.Add(model);
                }
            }

            return new SelectList(list, "Value", "Text");
        }
Beispiel #2
0
        public static SelectList GetRoleTypeDropDown()
        {
            List<DropDownModelInt> list = new List<DropDownModelInt>();
            List<Role> roles = Provider.GetRoles();

            foreach (Role role in roles)
            {
                if (role.RoleTypeDescription != "Developer")
                {
                    DropDownModelInt model = new DropDownModelInt();

                    model.Text = role.RoleTypeDescription;
                    model.Value = role.RoleTypeId;

                    list.Add(model);
                }
            }

            return new SelectList(list, "Value", "Text");
        }
Beispiel #3
0
        public static SelectList GetShiftDropDown()
        {
            List<DropDownModelInt> list = new List<DropDownModelInt>();
            List<Shift> shifts = Provider.GetShifts();

            foreach (Shift shift in shifts)
            {
                DropDownModelInt model = new DropDownModelInt();

                model.Text = shift.ShiftName;
                model.Value = shift.ShiftId;

                list.Add(model);
            }

            return new SelectList(list, "Value", "Text");
        }