public static string GetCloudName(string ThumName) { Maticsoft.Model.Ms.ThumbnailSize modelByCache = new Maticsoft.BLL.Ms.ThumbnailSize().GetModelByCache(ThumName); if (modelByCache != null) { return modelByCache.CloudSizeName; } return ""; }
public static List<Maticsoft.Model.Ms.ThumbnailSize> GetThumSizeList(EnumHelper.AreaType type, string Theme = "") { string cacheKey = "GetThumSizeList-" + ((int) type) + Theme; object cache = DataCache.GetCache(cacheKey); if (cache == null) { Maticsoft.BLL.Ms.ThumbnailSize size = new Maticsoft.BLL.Ms.ThumbnailSize(); try { string strWhere = " Type=" + ((int) type); if (!string.IsNullOrWhiteSpace(Theme)) { strWhere = strWhere + " and (Theme='" + Theme + "' or Theme='')"; } cache = size.GetModelList(strWhere); if (cache != null) { int num = Globals.SafeInt(ConfigSystem.GetValueByCache("ModelCache"), 30); DataCache.SetCache(cacheKey, cache, DateTime.Now.AddMinutes((double) num), TimeSpan.Zero); } } catch { } } return (List<Maticsoft.Model.Ms.ThumbnailSize>) cache; }