📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using mima;
namespace book
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
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 textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox4;
private System.Windows.Forms.CheckBox checkBox5;
public System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.CheckBox checkBox6;
private System.Windows.Forms.TextBox textBox6;
public books.books books1;
public System.Data.SqlClient.SqlCommand sqlSelectCommand1;
public System.Data.SqlClient.SqlCommand sqlInsertCommand1;
public System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
public System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
public System.Data.SqlClient.SqlConnection sqlConnection1;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label4 = new System.Windows.Forms.Label();
this.label5 = 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.button4 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button3 = new System.Windows.Forms.Button();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.checkBox4 = new System.Windows.Forms.CheckBox();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.checkBox6 = new System.Windows.Forms.CheckBox();
this.label6 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.sqlDataAdapter1 = 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.books1 = new books.books();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.books1)).BeginInit();
this.SuspendLayout();
//
// label4
//
this.label4.Location = new System.Drawing.Point(104, 96);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(72, 23);
this.label4.TabIndex = 7;
this.label4.Text = "出版日期:";
//
// label5
//
this.label5.Location = new System.Drawing.Point(104, 120);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(72, 23);
this.label5.TabIndex = 8;
this.label5.Text = "定价:";
//
// label1
//
this.label1.Location = new System.Drawing.Point(104, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 4;
this.label1.Text = "书名 :";
//
// label2
//
this.label2.Location = new System.Drawing.Point(104, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 5;
this.label2.Text = "作者:";
//
// label3
//
this.label3.Location = new System.Drawing.Point(104, 72);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(72, 23);
this.label3.TabIndex = 6;
this.label3.Text = "出版社:";
//
// button4
//
this.button4.Location = new System.Drawing.Point(40, 304);
this.button4.Name = "button4";
this.button4.TabIndex = 3;
this.button4.Text = "超级用户";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(176, 48);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(136, 21);
this.textBox2.TabIndex = 10;
this.textBox2.Text = "";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(176, 72);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(136, 21);
this.textBox3.TabIndex = 11;
this.textBox3.Text = "";
//
// button1
//
this.button1.Location = new System.Drawing.Point(40, 176);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "全部浏览";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(176, 24);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(136, 21);
this.textBox1.TabIndex = 9;
this.textBox1.Text = "";
//
// button3
//
this.button3.Location = new System.Drawing.Point(40, 264);
this.button3.Name = "button3";
this.button3.TabIndex = 2;
this.button3.Text = "清理表格";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(176, 96);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(136, 21);
this.textBox4.TabIndex = 12;
this.textBox4.Text = "";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(176, 120);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(136, 21);
this.textBox5.TabIndex = 13;
this.textBox5.Text = "";
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -