BookManager/frmAdmin/frmAdminAdd.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;
using Model;
using BLL;

namespace BookManager.frmAdmin
{
    public partial class frmAdminAdd : Form
    {
        public frmAdminAdd()
        {
            InitializeComponent();
        }

        private void btnAdd_Click_1(object sender, EventArgs e)
        {
            Admin admin = new Admin();
            AdminBLL adminBLL = new AdminBLL();
            admin.AdminName = txtName.Text;
            admin.Password = txtPwd.Text;
            if (radNormal.Checked)
            {
                admin.AdminIdenti = radNormal.Text;
            }
            else
            {
                admin.AdminIdenti = radSuper.Text;
            }
            admin.AdminId = txtNo.Text;
            try
            {
                if (adminBLL.AdminAdd(admin))
                {
                    MessageBox.Show("用户添加成功!","用户添加");
                    this.Dispose();
                }
                else
                {
                    MessageBox.Show("用户添加失败,请确认!","用户添加");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }


    }
后面还有 1 行代码,购买后查看完整代码

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

AI 解读 AI

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

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