ViewController/LoginForm.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 BookMIS.Model.User;
using BookMIS.ViewController.Common;

namespace BookMIS.ViewController
{
    public partial class LoginForm : Form
    {
        UserDAO userdao = new UserDAOImpl();
        public LoginForm()
        {
            InitializeComponent();
        }

        private void LoginForm_Load(object sender, EventArgs e)
        {

        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            if (txtName.Text=="")
            {
                MessageBox.Show("用户名不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (txtPwd.Text =="")
            {
                MessageBox.Show("密码不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
            if (userdao.SelectUser(txtName.Text, txtPwd.Text) > 0)
            {
                MainForm mf = new MainForm();
                mf.Tag = txtName.Text;
                mf.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("您输入的用户名或密码不正确", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                txtName.SelectAll();
                txtName.Focus();
                txtPwd.Text = "";               
                return;
            }
        }

        private void btnCZ_Click(object sender, EventArgs e)
        {
            txtName.Text = "";
            txtPwd.Text = "";
后面还有 11 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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