private void btn_ok_Click(object sender, EventArgs e) { try { if (this.txt_LoginName.Text == string.Empty) { ShowMessageBox.ShowInformation("请输入登录名称!"); return; } if (this.txt_Answer.Text == string.Empty) { ShowMessageBox.ShowInformation("请输入提示问题的答案!"); return; } int QuestionID = ((UComboItem)this.dll_QuestionID.SelectedItem).ValueIndex; UM_UserInfoBLL UserInfoBLL = new UM_UserInfoBLL(); UM_UserInfo UserInfo = UserInfoBLL.SeekForPassword(this.txt_LoginName.Text, this.txt_Answer.Text, QuestionID); if (UserInfo == null) { ShowMessageBox.ShowInformation("验证失败,请重新输入!"); return; } ShowMessageBox.ShowInformation(string.Format("你的登录密码为:{0}", UtilityClass.DesDecrypt(UserInfo.Password.ToString(), string.Empty))); } catch (Exception) { return; } }