PasswordMsgBoxModel.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using Aitex.Core.Account;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace MECF.Framework.UI.Core.Accounts
  8. {
  9. public class PasswordMsgBoxModel
  10. {
  11. private string _userName = "";
  12. private string _password = "";
  13. public string UserName
  14. {
  15. get
  16. {
  17. return _userName;
  18. }
  19. set
  20. {
  21. _userName = value;
  22. }
  23. }
  24. public string Password
  25. {
  26. get
  27. {
  28. return _password;
  29. }
  30. set
  31. {
  32. _password = value;
  33. }
  34. }
  35. public Account AccountInfo
  36. {
  37. get;
  38. set;
  39. }
  40. public String SessionId
  41. {
  42. get;
  43. set;
  44. }
  45. public string Role
  46. {
  47. get;
  48. set;
  49. }
  50. public void SetLoginResult(LoginResult result)
  51. {
  52. AccountClient.Instance.CurrentUser = result.AccountInfo;
  53. AccountInfo = result.AccountInfo;
  54. SessionId = result.SessionId;
  55. Role = AccountInfo.Role;
  56. }
  57. public PasswordMsgBoxModel()
  58. {
  59. UserName = string.Empty;
  60. Password = string.Empty;
  61. AccountInfo = new Account();
  62. }
  63. }
  64. }