TuShuLeiBieXiuGaiForm.cs

(开头部分) 3KB

这里只显示每个文件的开头 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 MF借书系统
{
    public partial class TuShuLeiBieXiuGaiForm : Form
    {
        public TuShuLeiBieXiuGaiForm()
        {
            InitializeComponent();
        }

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

        private void TuShuLeiBieXiuGaiForm_Load(object sender, EventArgs e)
        {
            ZhongJianChen.Class_TuShuLeiBieXiuGai tuShuLeiBieXiuGai = new ZhongJianChen.Class_TuShuLeiBieXiuGai();
            //dataGiadView绑定的数据源
            this.dataGridView1.DataSource = tuShuLeiBieXiuGai.getCombox().Tables[0];
            //数据库绑定相应的数据源
            this.comboBox1.DataSource= tuShuLeiBieXiuGai.getCombox().Tables[0];
            //界面显示值
            this.comboBox1.DisplayMember = "TypeId";
            //选中后的实际值
            this.comboBox1.ValueMember = "TypeName";
        }
        //事件:选项卡选择好时发生
        private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
        {
            textBox1.Text = comboBox1.SelectedValue.ToString();
            ZhongJianChen.Class_TuShuLeiBieXiuGai Tushu = new ZhongJianChen.Class_TuShuLeiBieXiuGai();
            string[] str = Tushu.getString(textBox1.Text);
            //得到字符串数组后,赋值给界面的文本框
            textBox2.Text = str[0];
            textBox3.Text = str[1];
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //判断更改输入的是否为空,如果为空.提示错误
            if (textBox1.Text == null && textBox1.Text == "")
            {
                MessageBox.Show("填写的图书类别不能为空!");
                return;
            }
            if (textBox2.Text == null && textBox2.Text == "")
            {
                MessageBox.Show("填写的可借天数不能为空!");
                return;
            }
            if (textBox3.Text == null && textBox3.Text == "")
后面还有 26 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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