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

📄 frmborrow.cs

📁 采用C#和SQL Server 2000开发 功能比较全面的图书馆管理系统
💻 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>
	/// frmBorrow 的摘要说明。
	/// </summary>
	public class frmBorrow : System.Windows.Forms.Form
	{
		internal System.Windows.Forms.ImageList ImageList1;
		internal System.Windows.Forms.ToolBarButton tbbSave;
		internal System.Windows.Forms.ToolBar ToolBar1;
		internal System.Windows.Forms.ToolBarButton tbbQuit;
		internal System.Windows.Forms.ToolBarButton tbbExit;
		internal System.Windows.Forms.GroupBox GroupBox2;
		internal System.Windows.Forms.DataGrid dgdList;
		internal System.Windows.Forms.Label Label6;
		internal System.Windows.Forms.Label Label5;
		internal System.Windows.Forms.TextBox txbBook;
		internal System.Windows.Forms.RadioButton rbnCode;
		internal System.Windows.Forms.RadioButton rbnBookNumber;
		internal System.Windows.Forms.GroupBox GroupBox1;
		internal System.Windows.Forms.Label Label4;
		internal System.Windows.Forms.TextBox txbCount;
		internal System.Windows.Forms.Label Label3;
		internal System.Windows.Forms.TextBox txbType;
		internal System.Windows.Forms.Label Label2;
		internal System.Windows.Forms.TextBox txbName;
		internal System.Windows.Forms.Label Label1;
		internal System.Windows.Forms.TextBox txbReader;
		internal System.Windows.Forms.RadioButton rbnReaderCode;
		internal System.Windows.Forms.RadioButton rbnReaderNumber;
		private System.ComponentModel.IContainer components;

		private DataTable dtData;

		public frmBorrow()
		{
			//
			// 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(frmBorrow));
			this.ImageList1 = new System.Windows.Forms.ImageList(this.components);
			this.tbbSave = new System.Windows.Forms.ToolBarButton();
			this.ToolBar1 = new System.Windows.Forms.ToolBar();
			this.tbbQuit = new System.Windows.Forms.ToolBarButton();
			this.tbbExit = new System.Windows.Forms.ToolBarButton();
			this.GroupBox2 = new System.Windows.Forms.GroupBox();
			this.dgdList = new System.Windows.Forms.DataGrid();
			this.Label6 = new System.Windows.Forms.Label();
			this.Label5 = new System.Windows.Forms.Label();
			this.txbBook = new System.Windows.Forms.TextBox();
			this.rbnCode = new System.Windows.Forms.RadioButton();
			this.rbnBookNumber = new System.Windows.Forms.RadioButton();
			this.GroupBox1 = new System.Windows.Forms.GroupBox();
			this.Label4 = new System.Windows.Forms.Label();
			this.txbCount = new System.Windows.Forms.TextBox();
			this.Label3 = new System.Windows.Forms.Label();
			this.txbType = new System.Windows.Forms.TextBox();
			this.Label2 = new System.Windows.Forms.Label();
			this.txbName = new System.Windows.Forms.TextBox();
			this.Label1 = new System.Windows.Forms.Label();
			this.txbReader = new System.Windows.Forms.TextBox();
			this.rbnReaderCode = new System.Windows.Forms.RadioButton();
			this.rbnReaderNumber = new System.Windows.Forms.RadioButton();
			this.GroupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dgdList)).BeginInit();
			this.GroupBox1.SuspendLayout();
			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.Color.Transparent;
			// 
			// tbbSave
			// 
			this.tbbSave.ImageIndex = 0;
			this.tbbSave.Text = "确定借书";
			// 
			// ToolBar1
			// 
			this.ToolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tbbSave,
																						this.tbbQuit,
																						this.tbbExit});
			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(692, 41);
			this.ToolBar1.TabIndex = 3;
			this.ToolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.ToolBar1_ButtonClick);
			// 
			// tbbQuit
			// 
			this.tbbQuit.ImageIndex = 1;
			this.tbbQuit.Text = "取消借书";
			// 
			// tbbExit
			// 
			this.tbbExit.ImageIndex = 2;
			this.tbbExit.Text = "退出";
			// 
			// GroupBox2
			// 
			this.GroupBox2.Controls.Add(this.dgdList);
			this.GroupBox2.Controls.Add(this.Label6);
			this.GroupBox2.Controls.Add(this.Label5);
			this.GroupBox2.Controls.Add(this.txbBook);
			this.GroupBox2.Controls.Add(this.rbnCode);
			this.GroupBox2.Controls.Add(this.rbnBookNumber);
			this.GroupBox2.Dock = System.Windows.Forms.DockStyle.Fill;
			this.GroupBox2.Location = new System.Drawing.Point(0, 112);
			this.GroupBox2.Name = "GroupBox2";
			this.GroupBox2.Size = new System.Drawing.Size(692, 198);
			this.GroupBox2.TabIndex = 5;
			this.GroupBox2.TabStop = false;
			this.GroupBox2.Text = "借阅图书信息(请按照 条形码 或者 编号 输入图书信息后回车)";
			// 
			// dgdList
			// 
			this.dgdList.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.dgdList.CaptionVisible = false;
			this.dgdList.DataMember = "";
			this.dgdList.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgdList.Location = new System.Drawing.Point(8, 96);
			this.dgdList.Name = "dgdList";
			this.dgdList.Size = new System.Drawing.Size(684, 88);
			this.dgdList.TabIndex = 9;
			// 
			// Label6
			// 
			this.Label6.Location = new System.Drawing.Point(280, 40);
			this.Label6.Name = "Label6";
			this.Label6.Size = new System.Drawing.Size(328, 32);
			this.Label6.TabIndex = 8;
			this.Label6.Text = "说明:借阅数量不可超过可借数量,借阅日期取当前日期,应还日期根究借阅日期和图书类型中的可借天数自动计算。";
			// 
			// Label5
			// 
			this.Label5.Location = new System.Drawing.Point(192, 48);
			this.Label5.Name = "Label5";
			this.Label5.Size = new System.Drawing.Size(80, 16);
			this.Label5.TabIndex = 7;
			this.Label5.Text = "回车确认输入";
			// 
			// txbBook
			// 
			this.txbBook.Location = new System.Drawing.Point(88, 48);
			this.txbBook.Name = "txbBook";
			this.txbBook.TabIndex = 6;
			this.txbBook.Text = "";
			this.txbBook.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txbBook_KeyDown);
			// 
			// rbnCode
			// 
			this.rbnCode.Location = new System.Drawing.Point(16, 56);
			this.rbnCode.Name = "rbnCode";
			this.rbnCode.Size = new System.Drawing.Size(64, 24);
			this.rbnCode.TabIndex = 5;
			this.rbnCode.Text = "条形码";
			// 
			// rbnBookNumber
			// 
			this.rbnBookNumber.Checked = true;
			this.rbnBookNumber.Location = new System.Drawing.Point(16, 32);
			this.rbnBookNumber.Name = "rbnBookNumber";
			this.rbnBookNumber.Size = new System.Drawing.Size(64, 24);
			this.rbnBookNumber.TabIndex = 4;
			this.rbnBookNumber.TabStop = true;
			this.rbnBookNumber.Text = "编号";
			// 
			// GroupBox1
			// 
			this.GroupBox1.Controls.Add(this.Label4);
			this.GroupBox1.Controls.Add(this.txbCount);
			this.GroupBox1.Controls.Add(this.Label3);
			this.GroupBox1.Controls.Add(this.txbType);
			this.GroupBox1.Controls.Add(this.Label2);
			this.GroupBox1.Controls.Add(this.txbName);
			this.GroupBox1.Controls.Add(this.Label1);
			this.GroupBox1.Controls.Add(this.txbReader);
			this.GroupBox1.Controls.Add(this.rbnReaderCode);
			this.GroupBox1.Controls.Add(this.rbnReaderNumber);
			this.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top;
			this.GroupBox1.Location = new System.Drawing.Point(0, 41);
			this.GroupBox1.Name = "GroupBox1";
			this.GroupBox1.Size = new System.Drawing.Size(692, 71);
			this.GroupBox1.TabIndex = 4;
			this.GroupBox1.TabStop = false;
			this.GroupBox1.Text = "读者信息(请按照 条形码 或者编号 输入读者信息后回车,该功能这么实现主要是演示如何用扫描枪管理图书馆的业务)";
			// 
			// Label4
			// 
			this.Label4.Location = new System.Drawing.Point(496, 35);
			this.Label4.Name = "Label4";
			this.Label4.Size = new System.Drawing.Size(56, 16);
			this.Label4.TabIndex = 9;
			this.Label4.Text = "可借册数";
			// 
			// txbCount
			// 
			this.txbCount.Location = new System.Drawing.Point(552, 30);
			this.txbCount.Name = "txbCount";
			this.txbCount.Size = new System.Drawing.Size(56, 21);
			this.txbCount.TabIndex = 8;
			this.txbCount.Text = "";
			// 
			// Label3
			// 
			this.Label3.Location = new System.Drawing.Point(400, 35);
			this.Label3.Name = "Label3";
			this.Label3.Size = new System.Drawing.Size(32, 16);
			this.Label3.TabIndex = 7;
			this.Label3.Text = "类型";
			// 
			// txbType
			// 
			this.txbType.Location = new System.Drawing.Point(432, 30);
			this.txbType.Name = "txbType";
			this.txbType.Size = new System.Drawing.Size(56, 21);
			this.txbType.TabIndex = 6;
			this.txbType.Text = "";
			// 

⌨️ 快捷键说明

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