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

📄 bookborrow.cs

📁 用编写的图书管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace 图书馆管理系统
{
	/// <summary>
	/// BookBorrow 的摘要说明。
	/// </summary>
	public class BookBorrow : System.Windows.Forms.Form
	{
		private int totalCount,thisCount;//储存已借书和本次借书数据
		private DataTable tblBooks;
		private string readerID;//保存查询到的读者编号
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.ToolBarButton tBtnSubmit;
		private System.Windows.Forms.ToolBarButton tBtnCancel;
		private System.Windows.Forms.ToolBarButton tBtnQuit;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.RadioButton rbt1;
		private System.Windows.Forms.RadioButton rbt2;
		private System.Windows.Forms.RadioButton rbt4;
		private System.Windows.Forms.RadioButton rbt3;
		private System.Windows.Forms.TextBox txt1;
		private System.Windows.Forms.TextBox txt2;
		private System.Windows.Forms.TextBox txt3;
		private System.Windows.Forms.TextBox txt4;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.TextBox txt5;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
	
		private System.ComponentModel.IContainer components;

		public BookBorrow()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(BookBorrow));
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tBtnSubmit = new System.Windows.Forms.ToolBarButton();
			this.tBtnCancel = new System.Windows.Forms.ToolBarButton();
			this.tBtnQuit = new System.Windows.Forms.ToolBarButton();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label3 = new System.Windows.Forms.Label();
			this.txt1 = new System.Windows.Forms.TextBox();
			this.rbt1 = new System.Windows.Forms.RadioButton();
			this.rbt2 = new System.Windows.Forms.RadioButton();
			this.txt2 = new System.Windows.Forms.TextBox();
			this.txt3 = new System.Windows.Forms.TextBox();
			this.txt4 = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.rbt4 = new System.Windows.Forms.RadioButton();
			this.rbt3 = new System.Windows.Forms.RadioButton();
			this.txt5 = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.SuspendLayout();
			// 
			// imageList1
			// 
			this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
			this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			this.imageList1.TransparentColor = System.Drawing.SystemColors.ControlLightLight;
			// 
			// toolBar1
			// 
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tBtnSubmit,
																						this.tBtnCancel,
																						this.tBtnQuit});
			this.toolBar1.DropDownArrows = true;
			this.toolBar1.ImageList = this.imageList1;
			this.toolBar1.Location = new System.Drawing.Point(0, 0);
			this.toolBar1.Name = "toolBar1";
			this.toolBar1.ShowToolTips = true;
			this.toolBar1.Size = new System.Drawing.Size(672, 41);
			this.toolBar1.TabIndex = 34;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// tBtnSubmit
			// 
			this.tBtnSubmit.ImageIndex = 7;
			this.tBtnSubmit.Text = "确定借书";
			this.tBtnSubmit.ToolTipText = "确定借书";
			// 
			// tBtnCancel
			// 
			this.tBtnCancel.ImageIndex = 8;
			this.tBtnCancel.Text = "取消借书";
			this.tBtnCancel.ToolTipText = "取消借书";
			// 
			// tBtnQuit
			// 
			this.tBtnQuit.ImageIndex = 9;
			this.tBtnQuit.Text = "退出";
			this.tBtnQuit.ToolTipText = "退出";
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.txt1);
			this.groupBox1.Controls.Add(this.rbt1);
			this.groupBox1.Controls.Add(this.rbt2);
			this.groupBox1.Controls.Add(this.txt2);
			this.groupBox1.Controls.Add(this.txt3);
			this.groupBox1.Controls.Add(this.txt4);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Location = new System.Drawing.Point(0, 40);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(672, 72);
			this.groupBox1.TabIndex = 35;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "读者信息";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(112, 24);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(100, 16);
			this.label3.TabIndex = 2;
			this.label3.Text = "输入后请回车";
			// 
			// txt1
			// 
			this.txt1.Location = new System.Drawing.Point(112, 40);
			this.txt1.Name = "txt1";
			this.txt1.Size = new System.Drawing.Size(136, 21);
			this.txt1.TabIndex = 1;
			this.txt1.Text = "";
			this.txt1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt1_KeyPress);
			// 
			// rbt1
			// 
			this.rbt1.Checked = true;
			this.rbt1.Location = new System.Drawing.Point(24, 16);
			this.rbt1.Name = "rbt1";
			this.rbt1.Size = new System.Drawing.Size(64, 24);
			this.rbt1.TabIndex = 0;
			this.rbt1.TabStop = true;
			this.rbt1.Text = "编号";
			// 
			// rbt2
			// 
			this.rbt2.Location = new System.Drawing.Point(24, 44);
			this.rbt2.Name = "rbt2";
			this.rbt2.Size = new System.Drawing.Size(64, 24);
			this.rbt2.TabIndex = 0;
			this.rbt2.Text = "条形码";
			// 
			// txt2
			// 
			this.txt2.Location = new System.Drawing.Point(280, 40);
			this.txt2.Name = "txt2";
			this.txt2.ReadOnly = true;
			this.txt2.TabIndex = 1;
			this.txt2.Text = "";
			// 
			// txt3
			// 
			this.txt3.Location = new System.Drawing.Point(408, 40);
			this.txt3.Name = "txt3";
			this.txt3.ReadOnly = true;
			this.txt3.TabIndex = 1;
			this.txt3.Text = "";
			// 
			// txt4
			// 
			this.txt4.Location = new System.Drawing.Point(536, 40);
			this.txt4.Name = "txt4";
			this.txt4.ReadOnly = true;
			this.txt4.TabIndex = 1;
			this.txt4.Text = "";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(280, 24);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(100, 16);
			this.label4.TabIndex = 2;
			this.label4.Text = "姓名";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(408, 24);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(100, 16);
			this.label5.TabIndex = 2;
			this.label5.Text = "类型";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(536, 24);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(100, 16);
			this.label6.TabIndex = 2;
			this.label6.Text = "可借册";
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.rbt4);
			this.groupBox2.Controls.Add(this.rbt3);
			this.groupBox2.Controls.Add(this.txt5);
			this.groupBox2.Controls.Add(this.label7);
			this.groupBox2.Enabled = false;
			this.groupBox2.Location = new System.Drawing.Point(0, 112);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(672, 72);
			this.groupBox2.TabIndex = 35;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "借阅图书信息";
			// 
			// rbt4
			// 
			this.rbt4.Location = new System.Drawing.Point(96, 32);
			this.rbt4.Name = "rbt4";
			this.rbt4.Size = new System.Drawing.Size(72, 24);
			this.rbt4.TabIndex = 0;
			this.rbt4.Text = "条形码";
			// 
			// rbt3
			// 
			this.rbt3.Checked = true;
			this.rbt3.Location = new System.Drawing.Point(24, 32);
			this.rbt3.Name = "rbt3";
			this.rbt3.Size = new System.Drawing.Size(56, 24);
			this.rbt3.TabIndex = 0;
			this.rbt3.TabStop = true;
			this.rbt3.Text = "编号";
			// 
			// txt5
			// 
			this.txt5.Location = new System.Drawing.Point(264, 32);
			this.txt5.Name = "txt5";
			this.txt5.Size = new System.Drawing.Size(136, 21);
			this.txt5.TabIndex = 1;
			this.txt5.Text = "";
			this.txt5.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt5_KeyPress);
			// 
			// label7

⌨️ 快捷键说明

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