RoleAuthModelBLLService.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using PMS.DBService.SysManager;
  2. using PMS.Interface.SysManager;
  3. using QWPlatform.IService;
  4. using QWPlatform.SystemLibrary.Utils;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Data;
  8. using System.Linq;
  9. using System.Text;
  10. namespace PMS.BusinessService.SysManager
  11. {
  12. public class RoleAuthModelBLLService : IRoleAuthModel
  13. {
  14. RoleAuthModelDBService RoleAuthService = DataServiceBase.Instance<RoleAuthModelDBService>();
  15. /// <summary>
  16. /// 系统角色权限的保存
  17. /// </summary>
  18. /// <param name="ids"></param>
  19. /// <returns></returns>
  20. public string SaveXtjsQx(string ids)
  21. {
  22. //拆分字符串拿到角色id值
  23. string[] re = ids.Split(',');
  24. int icount = re.Length;
  25. //角色id赋值
  26. string jsId = re[icount-1];
  27. if (re.Length == 2)
  28. {
  29. return RoleAuthService.GetXtjsQxId("", jsId);
  30. }
  31. //去第一位空串和最后一位角色id值
  32. else {
  33. string ids1 = ids.Substring(1, ids.Length - 3);
  34. //新增系统角色权限
  35. return RoleAuthService.GetXtjsQxId(ids1, jsId);
  36. }
  37. }
  38. }
  39. }