/// <summary>
 /// Validates login information. To be used when user submits the login form in the View.
 /// </summary>
 /// <returns>True if user and password are valid, false if invalid.</returns>
 public bool ValidateUser()
 {
     if (DBLayer.DomainModels.StudentModel.authenticate(this.Login.Username, this.Login.Password))
     {
         DBLayer.Student s = DBLayer.DomainModels.StudentModel.getByMatricId(this.Login.Username);
         SessionModel.GetInstance().Login(s);
         return(true);
     }
     else
     {
         return(false);
     }
 }
 public void SetLoggedInUser(DBLayer.Student s)
 {
     this._loggedInUser           = s;
     this.actionsPanel.Visibility = Visibility.Visible;
 }
 public void SetLoggedInUser(DBLayer.Student s)
 {
     this._loggedInUser = s;
     this.actionsPanel.Visibility = Visibility.Visible;
 }
Ejemplo n.º 4
0
 public void Refresh()
 {
     _loggedInUser = DBLayer.DomainModels.StudentModel.getByMatricId(_loggedInUser.MatricId);
 }
Ejemplo n.º 5
0
 public void Login(DBLayer.Student s)
 {
     _loggedInUser = s;
 }
 public void Login(DBLayer.Student s)
 {
     _loggedInUser = s;
 }
 public void Refresh()
 {
     _loggedInUser = DBLayer.DomainModels.StudentModel.getByMatricId(_loggedInUser.MatricId);
 }