📄 reader.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace Library
{
/// <summary>
/// Reader 的摘要说明。
/// </summary>
public class Reader : System.Windows.Forms.Form
{
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.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Windows.Forms.Button btnFirst;
private System.Windows.Forms.Button btnLast;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnPrevious;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnModify;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textPassword;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.TextBox textBorrowBooks;
private System.Windows.Forms.TextBox textEmail;
private System.Windows.Forms.TextBox textTelNo;
private System.Windows.Forms.TextBox textName;
private System.Windows.Forms.TextBox textId;
private System.Windows.Forms.Label lblDatasetPosition;
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 Library.DataSetReader objDataSetReader;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Reader()
{
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Reader));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textPassword = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.textEmail = new System.Windows.Forms.TextBox();
this.textName = new System.Windows.Forms.TextBox();
this.objDataSetReader = new Library.DataSetReader();
this.textId = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textTelNo = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.textBorrowBooks = new System.Windows.Forms.TextBox();
this.btnFirst = new System.Windows.Forms.Button();
this.btnLast = new System.Windows.Forms.Button();
this.btnNext = new System.Windows.Forms.Button();
this.btnPrevious = new System.Windows.Forms.Button();
this.lblDatasetPosition = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnApply = new System.Windows.Forms.Button();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.btnExit = new System.Windows.Forms.Button();
this.btnAdd = new System.Windows.Forms.Button();
this.btnModify = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.objDataSetReader)).BeginInit();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textPassword);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.textEmail);
this.groupBox1.Controls.Add(this.textName);
this.groupBox1.Controls.Add(this.textId);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.textTelNo);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.textBorrowBooks);
this.groupBox1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(16, 16);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(408, 160);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "客户信息维护";
this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
//
// textPassword
//
this.textPassword.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetReader, "Reader.ReaderPassword"));
this.textPassword.Location = new System.Drawing.Point(88, 80);
this.textPassword.Name = "textPassword";
this.textPassword.TabIndex = 13;
this.textPassword.Text = "";
//
// label7
//
this.label7.Location = new System.Drawing.Point(16, 88);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(72, 23);
this.label7.TabIndex = 12;
this.label7.Text = "客户口令";
//
// textEmail
//
this.textEmail.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetReader, "Reader.ReaderEmail"));
this.textEmail.Location = new System.Drawing.Point(288, 16);
this.textEmail.Name = "textEmail";
this.textEmail.TabIndex = 10;
this.textEmail.Text = "";
//
// textName
//
this.textName.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetReader, "Reader.ReaderName"));
this.textName.Location = new System.Drawing.Point(88, 48);
this.textName.Name = "textName";
this.textName.TabIndex = 8;
this.textName.Text = "";
//
// objDataSetReader
//
this.objDataSetReader.DataSetName = "DataSetReader";
this.objDataSetReader.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// textId
//
this.textId.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetReader, "Reader.ReaderID"));
this.textId.Location = new System.Drawing.Point(88, 16);
this.textId.Name = "textId";
this.textId.TabIndex = 7;
this.textId.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(216, 24);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 23);
this.label4.TabIndex = 3;
this.label4.Text = "电子邮件";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 1;
this.label2.Text = "客户姓名";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 0;
this.label1.Text = "客户编号";
//
// label3
//
this.label3.Location = new System.Drawing.Point(216, 56);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 23);
this.label3.TabIndex = 2;
this.label3.Text = "联系电话";
//
// textTelNo
//
this.textTelNo.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetReader, "Reader.ReaderPhoneNo"));
this.textTelNo.Location = new System.Drawing.Point(288, 48);
this.textTelNo.Name = "textTelNo";
this.textTelNo.TabIndex = 9;
this.textTelNo.Text = "";
//
// label5
//
this.label5.Location = new System.Drawing.Point(216, 88);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 23);
this.label5.TabIndex = 4;
this.label5.Text = "已租书目";
//
// textBorrowBooks
//
this.textBorrowBooks.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.objDataSetReader, "Reader.ReaderBorrowedbooks"));
this.textBorrowBooks.Location = new System.Drawing.Point(288, 80);
this.textBorrowBooks.Name = "textBorrowBooks";
this.textBorrowBooks.TabIndex = 11;
this.textBorrowBooks.Text = "";
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -