private void ForgotPass_UserName_TextChanged(object sender, TextChangedEventArgs e) { var forgotAccount = _dal.ForgotPass(ForgotPass_UserName.Text); if (forgotAccount != null) { Login_UserName.Text = forgotAccount.NickName; Login_Password.Password = forgotAccount.Password; ForgotPass_Info.Content = "Such a name exists"; } else { ForgotPass_Info.Content = "UserName not found!!"; Login_UserName.Text = String.Empty; Login_Password.Password = String.Empty; } }