⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formeditpsw.cs

📁 数据库开发与实例(1+1混合数据库开发实例丛书)人事管理系统的源代码
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace HRMan.SysOper
{
    public partial class FormEditPSW : Form
    {
        public FormEditPSW()
        {
            InitializeComponent();
        }

        private void FormEditPSW_Load(object sender, EventArgs e)
        {
            this.textboxUserName.Text = FormLogin.fl.comb;
        }

        private void cancel_bt_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Edit_bt_Click(object sender, EventArgs e)
        {
            
            if ((this.textboxOld.Text == "") || (this.textboxNew.Text == "") || (this.textboxConfigNew.Text == ""))
            {
                MessageBox.Show("输入项不能为空!");
                return;
            }
            if (this.textboxNew.Text != this.textboxConfigNew.Text)
            {
                MessageBox.Show("确认密码失败,请重新输入!");
                return;
            }
            else
            {
                DataAccess DAEdit = new DataAccess();// Base();
                string SqlTextUpdate = "update UserInfo set uPassword='" + this.textboxNew.Text.Trim() + "' where uName='" + this.textboxUserName.Text + "'";
                DAEdit.ExeSQL(SqlTextUpdate);
                MessageBox.Show("修改密码成功!");
            }
        }
        
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -