IAccountService.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ServiceModel;
  6. using Aitex.Core.Util;
  7. using MECF.Framework.Common.Account.Extends;
  8. namespace Aitex.Core.Account
  9. {
  10. [ServiceContract]
  11. public interface IAccountService
  12. {
  13. [OperationContract]
  14. LoginResult Login(string accountId, string password);
  15. [OperationContract]
  16. void Logout(string accountId);
  17. [OperationContract]
  18. CreateAccountResult CreateAccount(Account newAccount);
  19. [OperationContract]
  20. DeleteAccountResult DeleteAccount(string accountId);
  21. [OperationContract]
  22. GetAccountInfoResult GetAccountInfo(string accountId);
  23. [OperationContract]
  24. void RegisterViews(List<string> views);
  25. [OperationContract]
  26. UpdateAccountResult UpdateAccount(Account account);
  27. [OperationContract]
  28. GetAccountListResult GetAccountList();
  29. [OperationContract]
  30. ChangePwdResult ChangePassword(string accountId, string newPassword);
  31. [OperationContract]
  32. List<Account> GetLoginUsers();
  33. [OperationContract]
  34. void KickUserOut(string accountId, string reason);
  35. [OperationContract]
  36. SerializableDictionary<string, SerializableDictionary<string, ViewPermission>> GetAllRolesPermission();
  37. [OperationContract]
  38. bool SaveAllRolesPermission(Dictionary<string, Dictionary<string, ViewPermission>> data);
  39. [OperationContract]
  40. SerializableDictionary<string, string> GetAllViewList();
  41. [OperationContract]
  42. IEnumerable<string> GetAllRoles();
  43. [OperationContract]
  44. void CheckAlive(string accountId);
  45. [OperationContract]
  46. string GetProcessViewPermission();
  47. [OperationContract]
  48. bool SaveProcessViewPermission(string viewXML);
  49. //---------------------------------------------------------------
  50. //extended account management
  51. [OperationContract]
  52. List<Role> GetAllRoleList();
  53. [OperationContract]
  54. List<AccountEx> GetAllAccountExList();
  55. /// <summary>
  56. /// Return all roles except super role
  57. /// </summary>
  58. [OperationContract]
  59. List<Role> GetRoles();
  60. /// <summary>
  61. /// Return all accounts except super account
  62. /// </summary>
  63. [OperationContract]
  64. List<AccountEx> GetAccounts();
  65. [OperationContract]
  66. bool UpdateRole(Role role);
  67. [OperationContract]
  68. bool DeleteRole(string roleId);
  69. [OperationContract]
  70. List<AppMenu> GetMenusByRole(string roleId, List<AppMenu> lstMenu);
  71. [OperationContract]
  72. int GetMenuPermission(string roleId, string menuName);
  73. [OperationContract]
  74. bool UpdateAccountEx(AccountEx account);
  75. [OperationContract]
  76. bool DeleteAccountEx(string accountId);
  77. [OperationContract]
  78. LoginResult LoginEx(string accountId, string password, string role);
  79. [OperationContract]
  80. void LogoutEx(string accountId, string loginId );
  81. }
  82. }