ch
2022-05-30 f9ef44a67fbf73f073efe65600bc25e204fde04f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DAL;
 
namespace BLL
{
    public partial class FrmChangePsd : Form
    {
        public FrmChangePsd()
        {
            InitializeComponent();
        }
        public string UserCode;
 
        private void button1_Click(object sender, EventArgs e)
        {
            if (UserCode.Trim() == "")
            {
                MessageBox.Show("此用户不存在!", "提示");
                return;
            }
            if (txtCheckPsd.Text.Trim() != txtNewPsd.Text.Trim())
            {
                MessageBox.Show("2次输入密码不一致!", "提示");
                return;
            }
            ClsUser oUser = new ClsUser();
            oUser.UserCode = this.UserCode;
            oUser.Psd =DBUtility.ClsPub.StrToPsd(txtNewPsd.Text.Trim());
            if (oUser.ChangePsd())
            {
                MessageBox.Show("修改完毕!","提示");
                this.Close();
            }
            else
            {
                MessageBox.Show("修改失败!", "提示");
            }
        }
 
        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}