Advertisement
Guest User

Untitled

a guest
May 12th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using System.ComponentModel;
  3. using System.Runtime.CompilerServices;
  4. using Smartex2.Annotations;
  5.  
  6. namespace Smartex2.Model
  7. {
  8. public class User : INotifyPropertyChanged
  9. {
  10. private int _id;
  11.  
  12. public int Id
  13. {
  14. get { return _id; }
  15. set
  16. {
  17. _id = value;
  18. OnPropertyChange("Id");
  19. }
  20. }
  21.  
  22. private string _firstName;
  23.  
  24. public string FirstName
  25. {
  26. get { return _firstName; }
  27. set
  28. {
  29. _firstName = value;
  30. OnPropertyChange("FirstName");
  31. }
  32. }
  33. private string _lastName;
  34.  
  35. public string LastName
  36. {
  37. get { return _lastName; }
  38. set
  39. {
  40. _lastName = value;
  41. OnPropertyChange("LastName");
  42. }
  43. }
  44.  
  45. private string _login;
  46.  
  47. public string Login
  48. {
  49. get { return _login; }
  50. set
  51. {
  52. _login = value;
  53. OnPropertyChange("Login");
  54. }
  55. }
  56.  
  57. private string _password;
  58.  
  59. public string Password
  60. {
  61. get { return _password; }
  62. set
  63. {
  64. _password = value;
  65. OnPropertyChange("Password");
  66. }
  67. }
  68.  
  69. private int _university;
  70.  
  71. public int University
  72. {
  73. get { return _university; }
  74. set
  75. {
  76. _university = value;
  77. OnPropertyChange("University");
  78. }
  79. }
  80.  
  81. private string _faculty;
  82.  
  83. public string Faculty
  84. {
  85. get { return _faculty; }
  86. set
  87. {
  88. _faculty = value;
  89. OnPropertyChange("Faculty");
  90. }
  91. }
  92.  
  93. private string _fieldOfStudy;
  94.  
  95. public string FieldOfStudy
  96. {
  97. get { return _fieldOfStudy; }
  98. set
  99. {
  100. _fieldOfStudy = value;
  101. OnPropertyChange("FieldOfStudy");
  102. }
  103. }
  104.  
  105. public event PropertyChangedEventHandler PropertyChanged;
  106. private void OnPropertyChange(string propertyName)
  107. {
  108. if (PropertyChanged != null)
  109. {
  110. PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  111. }
  112. }
  113. public List<Event> events { get; set; }
  114.  
  115. public bool LoginUser(string login, string password)
  116. {
  117. /* TODO
  118. * walidacja usera, sprawdzanie z restem
  119. * itede w/e
  120. * ma zwracać true, jeżeli się da zalogować a false jak nie
  121. */
  122. return true;
  123. }
  124.  
  125. public User()
  126. {
  127.  
  128. }
  129. }
  130. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement