⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fborrowlist.cs

📁   一个用C#编写的图书管系统
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Library
{
    public partial class fBorrowList : Form
    {
        
         //属性
        #region 用来实现单例模式
        private static fBorrowList instance = null;
        public static fBorrowList Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new fBorrowList();
                }
                return instance;
            }
        }
        private fBorrowList()
        {
            InitializeComponent();
            instance = this;
        }
        private void fBorrowList_FormClosed( object sender, FormClosedEventArgs e)
        {
            instance = null;
        }
        #endregion
        //窗体首次加载时

        private void fBorrowlist_Load(object sender, EventArgs e)
        {
            cmblist.SelectedIndex = 0;
            cmblist.Focus();
        }

      

        private void toolStripButton5_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            tbSearch.Text = "";
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (cmblist.SelectedIndex == 0)
            {
                dataGridView1.DataSource = Library.ExecuteDataSet("select * from BRDetail where BookID'" + tbSearch.Text + "'").Tables[0];
            }
            else
            {
                dataGridView1.DataSource = Library.ExecuteDataSet("select * from BRDetail where ReaderXueHao='" + tbSearch.Text + "'").Tables[0];
            }
            
           
          
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -