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

📄 book.cs

📁 C#制作的小型图书馆管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;

namespace 图书馆管理系统
{
	/// <summary>
	/// Book 的摘要说明。
	/// </summary>
	public class Book : System.Windows.Forms.Form
	{
		private CurrencyManager cmOrders;

		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		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.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Button btnSearch;
		private System.Windows.Forms.TextBox txt1;
		private System.Windows.Forms.TextBox txt9;
		private System.Windows.Forms.TextBox txt8;
		private System.Windows.Forms.TextBox txt7;
		private System.Windows.Forms.TextBox txt6;
		private System.Windows.Forms.TextBox txt5;
		private System.Windows.Forms.TextBox txt4;
		private System.Windows.Forms.TextBox txt2;
		private System.Windows.Forms.TextBox txt3;
		private System.Data.SqlClient.SqlDataAdapter da1;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private 图书馆管理系统.DataSet1 dataSet11;
		private System.Windows.Forms.ToolBarButton tBtnNew;
		private System.Windows.Forms.ToolBarButton tBtnEdit;
		private System.Windows.Forms.ToolBarButton tBtnDelete;
		private System.Windows.Forms.ToolBarButton tBtnSave;
		private System.Windows.Forms.ToolBarButton tBtnQuit;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.TextBox txt10;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.TextBox txt11;
		private System.ComponentModel.IContainer components;

		public Book()
		{
			//
			// 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(Book));
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tBtnNew = new System.Windows.Forms.ToolBarButton();
			this.tBtnEdit = new System.Windows.Forms.ToolBarButton();
			this.tBtnDelete = new System.Windows.Forms.ToolBarButton();
			this.tBtnSave = new System.Windows.Forms.ToolBarButton();
			this.tBtnQuit = new System.Windows.Forms.ToolBarButton();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.dataSet11 = new 图书馆管理系统.DataSet1();
			this.btnSearch = new System.Windows.Forms.Button();
			this.txt1 = new System.Windows.Forms.TextBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.txt10 = new System.Windows.Forms.TextBox();
			this.label10 = new System.Windows.Forms.Label();
			this.txt9 = new System.Windows.Forms.TextBox();
			this.txt8 = new System.Windows.Forms.TextBox();
			this.txt7 = new System.Windows.Forms.TextBox();
			this.txt6 = new System.Windows.Forms.TextBox();
			this.txt5 = new System.Windows.Forms.TextBox();
			this.txt4 = new System.Windows.Forms.TextBox();
			this.label9 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.txt2 = new System.Windows.Forms.TextBox();
			this.txt3 = new System.Windows.Forms.TextBox();
			this.da1 = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.label11 = new System.Windows.Forms.Label();
			this.txt11 = new System.Windows.Forms.TextBox();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// toolBar1
			// 
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tBtnNew,
																						this.tBtnEdit,
																						this.tBtnDelete,
																						this.tBtnSave,
																						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(592, 41);
			this.toolBar1.TabIndex = 1;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// tBtnNew
			// 
			this.tBtnNew.ImageIndex = 0;
			this.tBtnNew.Text = "新增";
			this.tBtnNew.ToolTipText = "新增";
			// 
			// tBtnEdit
			// 
			this.tBtnEdit.ImageIndex = 1;
			this.tBtnEdit.Text = "修改";
			this.tBtnEdit.ToolTipText = "修改";
			// 
			// tBtnDelete
			// 
			this.tBtnDelete.ImageIndex = 2;
			this.tBtnDelete.Text = "删除";
			this.tBtnDelete.ToolTipText = "删除";
			// 
			// tBtnSave
			// 
			this.tBtnSave.ImageIndex = 3;
			this.tBtnSave.Text = "保存";
			this.tBtnSave.ToolTipText = "保存";
			// 
			// tBtnQuit
			// 
			this.tBtnQuit.Text = "退出";
			this.tBtnQuit.ToolTipText = "退出";
			// 
			// 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;
			// 
			// dataGrid1
			// 
			this.dataGrid1.CaptionVisible = false;
			this.dataGrid1.DataMember = "图书信息";
			this.dataGrid1.DataSource = this.dataSet11;
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(0, 88);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(592, 232);
			this.dataGrid1.TabIndex = 2;
			// 
			// dataSet11
			// 
			this.dataSet11.DataSetName = "DataSet1";
			this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
			// 
			// btnSearch
			// 
			this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSearch.Image")));
			this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
			this.btnSearch.Location = new System.Drawing.Point(16, 56);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new System.Drawing.Size(56, 23);
			this.btnSearch.TabIndex = 3;
			this.btnSearch.Text = "搜索";
			this.btnSearch.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
			// 
			// txt1
			// 
			this.txt1.Location = new System.Drawing.Point(136, 56);
			this.txt1.Name = "txt1";
			this.txt1.TabIndex = 4;
			this.txt1.Text = "";
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.txt11);
			this.groupBox1.Controls.Add(this.label11);
			this.groupBox1.Controls.Add(this.txt10);
			this.groupBox1.Controls.Add(this.label10);
			this.groupBox1.Controls.Add(this.txt9);
			this.groupBox1.Controls.Add(this.txt8);
			this.groupBox1.Controls.Add(this.txt7);
			this.groupBox1.Controls.Add(this.txt6);
			this.groupBox1.Controls.Add(this.txt5);
			this.groupBox1.Controls.Add(this.txt4);
			this.groupBox1.Controls.Add(this.label9);
			this.groupBox1.Controls.Add(this.label8);
			this.groupBox1.Controls.Add(this.label7);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Location = new System.Drawing.Point(8, 328);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(576, 144);
			this.groupBox1.TabIndex = 5;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "增改图书信息";
			// 
			// txt10
			// 
			this.txt10.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.库存"));
			this.txt10.Location = new System.Drawing.Point(384, 104);
			this.txt10.Name = "txt10";
			this.txt10.ReadOnly = true;
			this.txt10.Size = new System.Drawing.Size(48, 21);
			this.txt10.TabIndex = 16;
			this.txt10.Text = "";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(384, 80);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(40, 23);
			this.label10.TabIndex = 15;
			this.label10.Text = "库存";
			// 
			// txt9
			// 
			this.txt9.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.内容摘要"));
			this.txt9.Location = new System.Drawing.Point(8, 104);
			this.txt9.Name = "txt9";
			this.txt9.ReadOnly = true;
			this.txt9.Size = new System.Drawing.Size(368, 21);
			this.txt9.TabIndex = 14;
			this.txt9.Text = "";
			// 
			// txt8
			// 
			this.txt8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.出版日期"));
			this.txt8.Location = new System.Drawing.Point(400, 40);
			this.txt8.Name = "txt8";
			this.txt8.ReadOnly = true;
			this.txt8.TabIndex = 13;
			this.txt8.Text = "";
			// 
			// txt7
			// 
			this.txt7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.出版社"));
			this.txt7.Location = new System.Drawing.Point(296, 40);
			this.txt7.Name = "txt7";
			this.txt7.ReadOnly = true;
			this.txt7.TabIndex = 12;
			this.txt7.Text = "";
			// 
			// txt6
			// 
			this.txt6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.作者"));
			this.txt6.Location = new System.Drawing.Point(216, 40);
			this.txt6.Name = "txt6";
			this.txt6.ReadOnly = true;
			this.txt6.Size = new System.Drawing.Size(72, 21);
			this.txt6.TabIndex = 11;
			this.txt6.Text = "";
			// 
			// txt5
			// 
			this.txt5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.书名"));
			this.txt5.Location = new System.Drawing.Point(112, 40);
			this.txt5.Name = "txt5";
			this.txt5.ReadOnly = true;
			this.txt5.TabIndex = 10;
			this.txt5.Text = "";
			// 
			// txt4
			// 
			this.txt4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "图书信息.书号"));
			this.txt4.Location = new System.Drawing.Point(8, 40);
			this.txt4.Name = "txt4";
			this.txt4.ReadOnly = true;
			this.txt4.TabIndex = 9;
			this.txt4.Text = "";
			// 
			// label9

⌨️ 快捷键说明

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