Esempio n. 1
0
        /// <summary>
        /// creates a new login session with the username, password, and other relevant information about the user
        /// captain, position.
        /// </summary>
        /// <param name="Username"></param>
        /// <param name="Password"></param>
        public void NewSession(String Username, String Password)
        {
            api = APIController.GetAPIController();
            Boolean logincheck = api.Login(Username, Password);
            Boolean Captain    = api.CaptainCheck();

            session = new Session();
            session.createUser(Username, Password, Captain);
        }
Esempio n. 2
0
        /// <summary>
        /// checks if the user exists on the server through the API, returns true if they exist.
        /// </summary>
        /// <param name="username"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        public Boolean Login(String username, String password)
        {
            api = APIController.GetAPIController();
            Boolean logincheck = api.Login(username, password);
            Boolean Captain    = api.CaptainCheck();

            session = new Session();
            session.createUser(username, password, Captain);
            return(logincheck);
        }
Esempio n. 3
0
 /// <summary>
 /// returns the list of all technicians in the database
 /// </summary>
 /// <returns></returns>
 public List <WorkerItem> GetWorkerListItems()
 {
     api = APIController.GetAPIController();
     return(api.getWorkerListItem());
 }