示例#1
0
        /// <summary>
        /// Gets the nurse with the provided id.
        /// </summary>
        /// <returns></returns>
        public async Task <User> GetUser()
        {
            var nursedal = new NurseDAL();
            var nurse    = await nursedal.GetNurse(this.id);

            return(nurse);
        }
        private void handleLogin()
        {
            this.Nurse = NurseDAL.GetNurse(this.usernameTextBox.Text);

            if (this.IsAdminLoginPage & !this.Nurse.IsAdmin)
            {
                this.showDeniedAccessMessage();
            }
            else if (this.IsAdminLoginPage & this.Nurse.IsAdmin)
            {
                this.Hide();
                this.displayAdminMainPage();
            }
            else
            {
                this.Hide();
                this.displayUserMainPage();
            }
        }