예제 #1
0
 /// <summary>
 /// Logout user , set guest view
 /// </summary>
 /// <returns>True</returns>
 public Boolean logout()
 {
     myUserLogin = null;
     myUser = new User(-1);
     myViewFrame.setGuestViewOptions();
     return true;
 }
예제 #2
0
        /// <summary>
        /// Login user by username and password and set view by user type
        /// </summary>
        /// <param name="uname">Username</param>
        /// <param name="passw">Password</param>
        /// <returns>Succesful/Unsuccesful(true/false)</returns>
        public Boolean login(String uname, String passw)
        {
            myUserLogin = new Login(uname, passw);
            myUser = new User(myUserLogin.userId);
            if (myUserLogin.loggedIn)
                myViewFrame.setViewByUserType(myUserLogin.group);

            return myUserLogin.loggedIn;
        }