コード例 #1
0
ファイル: ESubscribePushType.cs プロジェクト: yankaics/cms-1
        public static ListItem GetListItem(ESubscribePushType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
コード例 #2
0
ファイル: ESubscribePushType.cs プロジェクト: yankaics/cms-1
 public static bool Equals(ESubscribePushType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
コード例 #3
0
 public static string GetText(ESubscribePushType type)
 {
     if (type == ESubscribePushType.ManualPush)
     {
         return("手动推送");
     }
     if (type == ESubscribePushType.TimedPush)
     {
         return("定时推送");
     }
     throw new Exception();
 }
コード例 #4
0
 public static string GetValue(ESubscribePushType type)
 {
     if (type == ESubscribePushType.ManualPush)
     {
         return("ManualPush");
     }
     if (type == ESubscribePushType.TimedPush)
     {
         return("TimedPush");
     }
     throw new Exception();
 }
コード例 #5
0
ファイル: ESubscribePushType.cs プロジェクト: yankaics/cms-1
 public static string GetText(ESubscribePushType type)
 {
     if (type == ESubscribePushType.ManualPush)
     {
         return("返強容僕");
     }
     else if (type == ESubscribePushType.TimedPush)
     {
         return("協扮容僕");
     }
     else
     {
         throw new Exception();
     }
 }
コード例 #6
0
ファイル: ESubscribePushType.cs プロジェクト: yankaics/cms-1
 public static bool Equals(string typeStr, ESubscribePushType type)
 {
     return(Equals(type, typeStr));
 }