TuShuXinXiXiuGaiForm.cs

(开头部分) 5KB

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

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }
        //窗口初始化时,自动加载相应信息
        private void TuShuXinXiXiuGaiForm_Load(object sender, EventArgs e)
        {
            ZhongJianChen.Class_TuShuXinxiXiuGai xinxi = new ZhongJianChen.Class_TuShuXinxiXiuGai();
            DataTable table = xinxi.getTable().Tables[0];
            dataGridView1.DataSource = table;
            typeName_combo.DataSource = xinxi.getCombo().Tables[0];
            typeName_combo.DisplayMember = "typeName";
            typeName_combo.ValueMember = "typeName";
        }
        //输入时自动验证相应信息
        private void ISBN_Text_TextChanged(object sender, EventArgs e)
        {
            ZhongJianChen.Class_TuShuXinxiXiuGai xinxi = new ZhongJianChen.Class_TuShuXinxiXiuGai();
            string[] str = xinxi.getString(this.ISBN_Text.Text);
            //从选项卡的Items获取循环的总次数
           for (int i = 0; i < typeName_combo.Items.Count; i++)
            {
               //将i的值赋给选项卡的索引
                typeName_combo.SelectedIndex = i;
                //比较,判断数据源的数据与输入的是否一致,一致的时候执行
               if (typeName_combo.SelectedValue.ToString() == str[2])
                {                       
                        //如果比较是一致的时候,将从中间层返回的字符串数组.
                        //遍历出来的字符串赋给界面层的组件文本上
                        int index = 3;
                        bookName_text.Text = str[index++];
                        writer_Text.Text = str[index++];
                        translator_Text.Text = str[index++];
                        publisher_Text.Text = str[index++];
                        date.Text = str[index++];
                        price.Text = str[index];
                        //获取得到编号值,修改的时候调用
                        ISBN2 = ISBN_Text.Text;
                        //跳出循环!
                        break;
                }
后面还有 66 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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