Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Runtime.CompilerServices;
- using Smartex2.Annotations;
- namespace Smartex2.Model
- {
- public class User : INotifyPropertyChanged
- {
- private int _id;
- public int Id
- {
- get { return _id; }
- set
- {
- _id = value;
- OnPropertyChange("Id");
- }
- }
- private string _firstName;
- public string FirstName
- {
- get { return _firstName; }
- set
- {
- _firstName = value;
- OnPropertyChange("FirstName");
- }
- }
- private string _lastName;
- public string LastName
- {
- get { return _lastName; }
- set
- {
- _lastName = value;
- OnPropertyChange("LastName");
- }
- }
- private string _login;
- public string Login
- {
- get { return _login; }
- set
- {
- _login = value;
- OnPropertyChange("Login");
- }
- }
- private string _password;
- public string Password
- {
- get { return _password; }
- set
- {
- _password = value;
- OnPropertyChange("Password");
- }
- }
- private int _university;
- public int University
- {
- get { return _university; }
- set
- {
- _university = value;
- OnPropertyChange("University");
- }
- }
- private string _faculty;
- public string Faculty
- {
- get { return _faculty; }
- set
- {
- _faculty = value;
- OnPropertyChange("Faculty");
- }
- }
- private string _fieldOfStudy;
- public string FieldOfStudy
- {
- get { return _fieldOfStudy; }
- set
- {
- _fieldOfStudy = value;
- OnPropertyChange("FieldOfStudy");
- }
- }
- public event PropertyChangedEventHandler PropertyChanged;
- private void OnPropertyChange(string propertyName)
- {
- if (PropertyChanged != null)
- {
- PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- public List<Event> events { get; set; }
- public bool LoginUser(string login, string password)
- {
- /* TODO
- * walidacja usera, sprawdzanie z restem
- * itede w/e
- * ma zwracać true, jeżeli się da zalogować a false jak nie
- */
- return true;
- }
- public User()
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement