public static ListItem GetListItem(ESSOAppType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static string GetText(ESSOAppType type) { if (type == ESSOAppType.SiteServer) { return("SiteServer 产品"); } if (type == ESSOAppType.Others) { return("其他"); } throw new Exception(); }
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); }
public static string GetValue(ESSOAppType type) { if (type == ESSOAppType.SiteServer) { return("SiteServer"); } if (type == ESSOAppType.Others) { return("Others"); } throw new Exception(); }
public static bool Equals(string typeStr, ESSOAppType type) { return(Equals(type, typeStr)); }