示例#1
0
        public static string GetFormattedString(this EventDateEnum days)
        {
            var formattedText = "";

            if (days.HasFlag(EventDateEnum.DAY1))
            {
                formattedText += "11/3";
            }
            if (days.HasFlag(EventDateEnum.DAY2))
            {
                formattedText += (!string.IsNullOrEmpty(formattedText) ? ", " : "") + "11/4";
            }
            if (days.HasFlag(EventDateEnum.DAY3))
            {
                formattedText += (!string.IsNullOrEmpty(formattedText) ? ", " : "") + "11/5";
            }

            return(formattedText);
        }
示例#2
0
 public static bool IsAll(this EventDateEnum days)
 {
     return(days.HasFlag(EventDateEnum.DAY1) &&
            days.HasFlag(EventDateEnum.DAY2) &&
            days.HasFlag(EventDateEnum.DAY3));
 }