Backup/NetBarManageSystem/Form_tjgly.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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;

namespace NetBarManageSystem_lihang
{
    public partial class Form_tjgly : Form
    {
        public Form_tjgly()
        {
            InitializeComponent();
        }
        
        private void btn_qdtj_Click(object sender, EventArgs e)
        {
            if (this.txt_name.Text.Trim() == "")
            {
                MessageBox.Show("请输入用户名.....", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

               
            }
            else
            {
                if (this.txt_pwd.Text.Trim() == "")
                {
                    MessageBox.Show("请输入密码.....", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                  
                }

                else
                {
                    //查询管理名是否重复
                    string sql_name = "select * from userInfo where userName='" + this.txt_name.Text + "'";
                    //执行查询
                    DataTable table = sql_zsgc.cx(sql_name);

                    if (table.Rows.Count > 0)
                    {
                        MessageBox.Show("抱歉,此用户名已存在.....", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }


                    else
                    {
                        //添加用户的sql语句
                        string sql = "insert into userInfo values ('" + this.txt_name.Text + "','" + this.txt_pwd.Text + "',0,0) ";


                        //执行
                        int result = sql_zsgc.zsg(sql);

                        if (result >= 1)
                        {
                            MessageBox.Show("恭喜您添加管理员成功!", "系统提示");
                        }
后面还有 20 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。