Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public static string GetText(ESSOAppType type)
 {
     if (type == ESSOAppType.SiteServer)
     {
         return("SiteServer 产品");
     }
     if (type == ESSOAppType.Others)
     {
         return("其他");
     }
     throw new Exception();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 4
0
 public static string GetValue(ESSOAppType type)
 {
     if (type == ESSOAppType.SiteServer)
     {
         return("SiteServer");
     }
     if (type == ESSOAppType.Others)
     {
         return("Others");
     }
     throw new Exception();
 }
Ejemplo n.º 5
0
 public static bool Equals(string typeStr, ESSOAppType type)
 {
     return(Equals(type, typeStr));
 }