Exemplo n.º 1
0
        public static string GetStringFromTogetherType(TogetherTypeEnum value)
        {
            switch (value)
            {
            case TogetherTypeEnum.Normal:
                return("聚会");

            case TogetherTypeEnum.Sports:
                return("体育活动");

            case TogetherTypeEnum.Lecture:
                return("讲座");

            case TogetherTypeEnum.Game:
                return("游戏娱乐");

            case TogetherTypeEnum.Music:
                return("影音娱乐");

            case TogetherTypeEnum.Travel:
                return("旅游");

            case TogetherTypeEnum.Online:
                return("线上聚会");

            case TogetherTypeEnum.Public:
                return("公益活动");

            case TogetherTypeEnum.Other:
                return("其他");

            default:
                return("聚会");
            }
        }
Exemplo n.º 2
0
        private static SelectList CreateTogetherTypes(TogetherTypeEnum SelectedType)
        {
            Dictionary <int, string> togetherTypes = new Dictionary <int, string>();

            foreach (int i in Enum.GetValues(typeof(TogetherTypeEnum)))
            {
                togetherTypes.Add(i, Together.GetStringFromTogetherType((TogetherTypeEnum)i));
            }
            return(new SelectList(togetherTypes, "Key", "Value", (int)SelectedType));
        }