private void LoginCheck() { if (string.IsNullOrWhiteSpace(this.txt_UserName.Text) || string.IsNullOrWhiteSpace(this.pwd_Password.Password)) { WPFMessageBox.Show("Please enter a User Name and a Password."); } else { string ID = txt_UserName.Text; string PIN = pwd_Password.Password; string hashedPIN = ChildcareApplication.AdminTools.Hashing.HashPass(PIN); bool userFound = this.db.validateAdminLogin(ID, hashedPIN); if (userFound) { if (parentTools) { DisplayAdminChildCheckIn(); } else { int accessLevel = db.GetAccessLevel(ID); DisplayAdminWindow(accessLevel, txt_UserName.Text); } } else { WPFMessageBox.Show("User ID or PIN does not exist"); int accessLevel = db.GetAccessLevel(ID); DisplayAdminWindow(accessLevel, txt_UserName.Text); } } }