IwbCacheNames.cs 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System.Collections.Generic;
  2. using System.Web.Mvc;
  3. using Abp.Localization;
  4. using IwbZero;
  5. using IwbZero.Authorization.Base.Roles;
  6. using IwbZero.Authorization.Base.Users;
  7. namespace ContractService.Configuration
  8. {
  9. public class IwbCacheNames
  10. {
  11. public const string FunctionCache = "FunctionCache";
  12. public const string NavFunctionCache = "NavFunctionCache";
  13. public const string QueryLawFirmNo = "QueryLawFirmNo";
  14. public const string QueryCompanyNo = "QueryCompanyNo";
  15. public const string QueryCaseNo = "QueryCaseNo";
  16. public const string QueryLawyerInfo = "QueryLawyerInfo";
  17. public const string QueryStaffInfo = "QueryStaffInfo";
  18. public const string QueryKeyPointStaffInfo = "QueryKeyPointStaffInfo";
  19. public const string QuerySysName = "QuerySysName";
  20. public const string EntityCacheName = "EntityCacheName";
  21. public static readonly List<string> RefreshList = new List<string>()
  22. {
  23. NavFunctionCache,
  24. FunctionCache,
  25. UserPermissionCacheItem.CacheStoreName,
  26. RolePermissionCacheItem.CacheStoreName,
  27. };
  28. public static List<SelectListItem> GetCacheList()
  29. {
  30. var sList = new List<SelectListItem> { new SelectListItem() { Value = "", Text = L("CacheAll") } };
  31. foreach (var l in RefreshList)
  32. {
  33. sList.Add(new SelectListItem() { Value = l, Text = L(l) });
  34. }
  35. return sList;
  36. }
  37. private static string L(string name)
  38. {
  39. var str = LocalizationHelper.GetSource(IwbZeroConsts.LocalizationSourceName).GetString(name);
  40. return str;
  41. }
  42. //public static List<CacheItem> Caches => new List<CacheItem>()
  43. //{
  44. // new CacheItem(FunctionCache),
  45. //};
  46. }
  47. //public class CacheItem
  48. //{
  49. // public CacheItem()
  50. // {
  51. // }
  52. // public CacheItem(string name, string displayName)
  53. // {
  54. // Name = name;
  55. // DisplayName = displayName;
  56. // }
  57. // public CacheItem(string name)
  58. // {
  59. // Name = name;
  60. // DisplayName = name;
  61. // }
  62. // public string Name { get; set; }
  63. // public string DisplayName { get; set; }
  64. //}
  65. }