Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

54 wiersze
1.6 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. namespace Basic.BLL
  6. {
  7. /// <summary>
  8. /// 管理员
  9. /// </summary>
  10. public class manager_role
  11. {
  12. /// <summary>
  13. /// 检查是否有权限
  14. /// </summary>
  15. public bool Exists(int role_id, string channel_name, string action_type)
  16. {
  17. Model.manager_role model = new DAL.manager_role().GetModel(role_id);
  18. if (model != null)
  19. {
  20. if (model.role_type == 1)
  21. {
  22. return true;
  23. }
  24. Model.manager_role_value modelt = model.manager_role_values.Find(p => p.channel_name == channel_name && p.action_type == action_type);
  25. if (modelt != null)
  26. {
  27. return true;
  28. }
  29. }
  30. return false;
  31. }
  32. /// <summary>
  33. /// 检查是否有权限
  34. /// </summary>
  35. public bool Exists(int role_id, int channel_id, string action_type)
  36. {
  37. Model.manager_role model = new DAL.manager_role().GetModel(role_id);
  38. if (model != null)
  39. {
  40. if (model.role_type == 1)
  41. {
  42. return true;
  43. }
  44. Model.manager_role_value modelt = model.manager_role_values.Find(p => p.channel_id == channel_id && p.action_type == action_type);
  45. if (modelt != null)
  46. {
  47. return true;
  48. }
  49. }
  50. return false;
  51. }
  52. }
  53. }