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

📄 client.cs

📁 C#制作的小型图书馆管理系统
💻 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>
	/// Client 的摘要说明。
	/// </summary>
	public class Client : System.Windows.Forms.Form
	{
		public string ReaderID;//保存查询到的读者编号
		private CurrencyManager cmOrders;

		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox txt1;
		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.TextBox txt2;
		private System.Windows.Forms.TextBox txt3;
		private System.Windows.Forms.TextBox txt4;
		private System.Windows.Forms.TextBox txt5;
		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.TextBox txt6;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.TextBox txt7;
		private System.Windows.Forms.TextBox txt8;
		private System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.ToolBarButton tBtnPersonal;
		private System.Windows.Forms.ToolBarButton tBtnBorrow;
		private System.Windows.Forms.ToolBarButton tBtnSave;
		private System.Windows.Forms.ToolBarButton tBtnQuit;
		private System.Windows.Forms.Button btnSearch;
		private System.Data.SqlClient.SqlDataAdapter da1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private 图书馆管理系统客户端.DataSet1 dataSet11;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

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

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

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Client());
		}

		/// <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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Client));
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.txt5 = new System.Windows.Forms.TextBox();
			this.txt4 = new System.Windows.Forms.TextBox();
			this.txt3 = new System.Windows.Forms.TextBox();
			this.txt2 = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.txt1 = new System.Windows.Forms.TextBox();
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tBtnPersonal = new System.Windows.Forms.ToolBarButton();
			this.tBtnBorrow = new System.Windows.Forms.ToolBarButton();
			this.tBtnSave = new System.Windows.Forms.ToolBarButton();
			this.tBtnQuit = new System.Windows.Forms.ToolBarButton();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.txt8 = new System.Windows.Forms.TextBox();
			this.txt7 = new System.Windows.Forms.TextBox();
			this.label8 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.txt6 = new System.Windows.Forms.TextBox();
			this.btnSearch = new System.Windows.Forms.Button();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.dataSet11 = new 图书馆管理系统客户端.DataSet1();
			this.da1 = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
			this.SuspendLayout();
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.txt5);
			this.groupBox1.Controls.Add(this.txt4);
			this.groupBox1.Controls.Add(this.txt3);
			this.groupBox1.Controls.Add(this.txt2);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.label4);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.txt1);
			this.groupBox1.Location = new System.Drawing.Point(8, 56);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(632, 88);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "读者信息";
			// 
			// txt5
			// 
			this.txt5.Location = new System.Drawing.Point(504, 48);
			this.txt5.Name = "txt5";
			this.txt5.ReadOnly = true;
			this.txt5.TabIndex = 9;
			this.txt5.Text = "";
			// 
			// txt4
			// 
			this.txt4.Location = new System.Drawing.Point(360, 48);
			this.txt4.Name = "txt4";
			this.txt4.ReadOnly = true;
			this.txt4.Size = new System.Drawing.Size(112, 21);
			this.txt4.TabIndex = 8;
			this.txt4.Text = "";
			// 
			// txt3
			// 
			this.txt3.Location = new System.Drawing.Point(288, 48);
			this.txt3.Name = "txt3";
			this.txt3.ReadOnly = true;
			this.txt3.Size = new System.Drawing.Size(40, 21);
			this.txt3.TabIndex = 7;
			this.txt3.Text = "";
			// 
			// txt2
			// 
			this.txt2.Location = new System.Drawing.Point(160, 48);
			this.txt2.Name = "txt2";
			this.txt2.ReadOnly = true;
			this.txt2.TabIndex = 6;
			this.txt2.Text = "";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(504, 24);
			this.label5.Name = "label5";
			this.label5.TabIndex = 5;
			this.label5.Text = "年级";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(360, 24);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(112, 23);
			this.label4.TabIndex = 4;
			this.label4.Text = "系名";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(288, 24);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(40, 23);
			this.label3.TabIndex = 3;
			this.label3.Text = "性别";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(160, 24);
			this.label2.Name = "label2";
			this.label2.TabIndex = 2;
			this.label2.Text = "姓名";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(16, 24);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(120, 23);
			this.label1.TabIndex = 1;
			this.label1.Text = "证号(按回车显示)";
			// 
			// txt1
			// 
			this.txt1.Location = new System.Drawing.Point(16, 48);
			this.txt1.Name = "txt1";
			this.txt1.Size = new System.Drawing.Size(120, 21);
			this.txt1.TabIndex = 0;
			this.txt1.Text = "";
			this.txt1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txt1_KeyPress);
			// 
			// toolBar1
			// 
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tBtnPersonal,
																						this.tBtnBorrow,
																						this.tBtnSave,
																						this.tBtnQuit});
			this.toolBar1.DropDownArrows = true;
			this.toolBar1.Location = new System.Drawing.Point(0, 0);
			this.toolBar1.Name = "toolBar1";
			this.toolBar1.ShowToolTips = true;
			this.toolBar1.Size = new System.Drawing.Size(648, 41);
			this.toolBar1.TabIndex = 1;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// tBtnPersonal
			// 
			this.tBtnPersonal.Text = "修改个人信息";
			this.tBtnPersonal.ToolTipText = "修改个人信息";
			// 
			// tBtnBorrow
			// 
			this.tBtnBorrow.Text = "个人借阅情况";
			this.tBtnBorrow.ToolTipText = "个人借阅情况";
			// 
			// tBtnSave
			// 
			this.tBtnSave.Text = "保存个人信息";
			this.tBtnSave.ToolTipText = "保存个人信息";
			// 
			// tBtnQuit
			// 
			this.tBtnQuit.Text = "退出客户程序";
			this.tBtnQuit.ToolTipText = "退出客户程序";

⌨️ 快捷键说明

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