public static ListItem GetListItem(EImportExportType type, bool selected) { var item = new ListItem(GetText(type), GetValue(type)); if (selected) { item.Selected = true; } return(item); }
public static bool Equals(EImportExportType type, string typeStr) { if (string.IsNullOrEmpty(typeStr)) { return(false); } if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower())) { return(true); } return(false); }
public static string GetText(EImportExportType type) { if (type == EImportExportType.Template) { return("网站模板"); } if (type == EImportExportType.DisplayMode) { return("列表显示方式"); } if (type == EImportExportType.MenuDisplay) { return("菜单显示方式"); } if (type == EImportExportType.Vote) { return("投票项数据"); } throw new Exception(); }
public static string GetValue(EImportExportType type) { if (type == EImportExportType.Template) { return("Template"); } if (type == EImportExportType.DisplayMode) { return("DisplayMode"); } if (type == EImportExportType.MenuDisplay) { return("MenuDisplay"); } if (type == EImportExportType.Vote) { return("Vote"); } throw new Exception(); }
public static bool Equals(string typeStr, EImportExportType type) { return(Equals(type, typeStr)); }