?? bookborrow.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace 圖書館管理系統(tǒng)
{
/// <summary>
/// BookBorrow 的摘要說明。
/// </summary>
public class BookBorrow : System.Windows.Forms.Form
{
private int totalCount,thisCount;//儲存已借書和本次借書數(shù)據(jù)
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 調(diào)用后添加任何構(gòu)造函數(shù)代碼
//
}
/// <summary>
/// 清理所有正在使用的資源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗體設計器生成的代碼
/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內(nèi)容。
/// </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 + -