日期:2014-05-17 浏览次数:20825 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication1
{
public partial class xgmm : Form
{
string username = login.uname;//获得到当前用户名
string connectionString;
// SqlConnection conn;
public xgmm()
{
InitializeComponent();
//禁止最大化
this.MaximizeBox = false;
ymmtextbox_xgmm.PasswordChar = '*';
xmmtextBox_xgmm.PasswordChar = '*';
zsrxmmtextBox_xgmm.PasswordChar = '*';
zsrxmmtextBox_xgmm.PasswordChar = '*';
connectionString = Properties.Settings.Default.SSGLConnectionString;
}
//??????????????
//问题 输入原先密码不正确怎么办
private void qdbutton_xgmm_Click(object sender, EventArgs e)
{
// string passwd = "123456";
using (SqlConnection conn = new SqlConnection(connectionString))
{
try
{
conn.Open();
}
catch
{
MessageBox.Show("数据库连接失败!");
}
//输入的密码合法性判断
if (ymmtextbox_xgmm.Text == "" || xmmtextBox_xgmm.Text == "" || zsrxmmtextBox_xgmm.Text == "")
&n