NetBarManageSystem/Form_scgly.cs

(开头部分) 1KB

这里只显示每个文件的开头 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_scgly : Form
    {
        public Form_scgly()
        {
            InitializeComponent();
        }

        private void btn_qdsc_Click(object sender, EventArgs e)
        {

            if (this.cbo_name.Text == "admin")
            {
                MessageBox.Show("系统管理员不能删除!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            else
            {
                string sql = "delete from userInfo where userId=" + this.cbo_name.SelectedValue + " ";

                int result = sql_zsgc.zsg(sql);
                if (result >= 1)
                {
                    MessageBox.Show("恭喜您,删除管理员成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    For_scgly_Shown_1(null,null);
                }
                else
                {
                    MessageBox.Show("抱歉,删除管理员数据操作失败!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
 
            }
            
        }

   

        private void For_scgly_Shown_1(object sender, EventArgs e)
        {
            //查询所有的管理员
            string sql1 = "select * from userInfo";
            DataTable table = sql_zsgc.cx(sql1);

            this.cbo_name.DataSource = table;
            this.cbo_name.DisplayMember = "userName";
            this.cbo_name.ValueMember = "userId";
        }

        private void btn_qdqx_Click(object sender, EventArgs e)
        {
后面还有 6 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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