コード例 #1
0
        public static ListItem GetListItem(ESSOAppType type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
コード例 #2
0
 public static string GetText(ESSOAppType type)
 {
     if (type == ESSOAppType.SiteServer)
     {
         return("SiteServer 产品");
     }
     if (type == ESSOAppType.Others)
     {
         return("其他");
     }
     throw new Exception();
 }
コード例 #3
0
 public static bool Equals(ESSOAppType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
コード例 #4
0
 public static string GetValue(ESSOAppType type)
 {
     if (type == ESSOAppType.SiteServer)
     {
         return("SiteServer");
     }
     if (type == ESSOAppType.Others)
     {
         return("Others");
     }
     throw new Exception();
 }
コード例 #5
0
 public static bool Equals(string typeStr, ESSOAppType type)
 {
     return(Equals(type, typeStr));
 }