📄 dzcx.cs
字号:
this.groupBox4.Location = new System.Drawing.Point(752, 0);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(208, 333);
this.groupBox4.TabIndex = 1;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "操作";
//
// button4
//
this.button4.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button4.Location = new System.Drawing.Point(64, 146);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(75, 48);
this.button4.TabIndex = 1;
this.button4.Text = "查 询";
this.button4.Click += new System.EventHandler(this.button4_Click);
this.button4.KeyDown += new System.Windows.Forms.KeyEventHandler(this.button5_KeyDown);
//
// textBox1
//
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox1.Location = new System.Drawing.Point(16, 88);
this.textBox1.MaxLength = 10;
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(176, 26);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "";
this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.button5_KeyDown);
//
// label1
//
this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(8, 66);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(144, 23);
this.label1.TabIndex = 0;
this.label1.Text = "输入读者编号:";
//
// button5
//
this.button5.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button5.Location = new System.Drawing.Point(64, 218);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(75, 48);
this.button5.TabIndex = 2;
this.button5.Text = "返 回";
this.button5.Click += new System.EventHandler(this.button5_Click);
this.button5.KeyDown += new System.Windows.Forms.KeyEventHandler(this.button5_KeyDown);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.dataGrid2);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Location = new System.Drawing.Point(0, 0);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(960, 333);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "记录浏览";
//
// dataGrid2
//
this.dataGrid2.DataMember = "";
this.dataGrid2.DataSource = this.dataSet21.dzxxb;
this.dataGrid2.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGrid2.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid2.Location = new System.Drawing.Point(3, 17);
this.dataGrid2.Name = "dataGrid2";
this.dataGrid2.ReadOnly = true;
this.dataGrid2.Size = new System.Drawing.Size(954, 313);
this.dataGrid2.TabIndex = 0;
//
// tabPage3
//
this.tabPage3.Controls.Add(this.groupBox6);
this.tabPage3.Controls.Add(this.groupBox5);
this.tabPage3.Location = new System.Drawing.Point(4, 21);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(960, 333);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = "按姓名查询";
//
// groupBox6
//
this.groupBox6.Controls.Add(this.dataGrid3);
this.groupBox6.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox6.Location = new System.Drawing.Point(0, 0);
this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(744, 333);
this.groupBox6.TabIndex = 1;
this.groupBox6.TabStop = false;
this.groupBox6.Text = "记录浏览";
//
// dataGrid3
//
this.dataGrid3.DataMember = "";
this.dataGrid3.DataSource = this.dataSet21.dzxxb;
this.dataGrid3.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGrid3.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid3.Location = new System.Drawing.Point(3, 17);
this.dataGrid3.Name = "dataGrid3";
this.dataGrid3.ReadOnly = true;
this.dataGrid3.Size = new System.Drawing.Size(738, 313);
this.dataGrid3.TabIndex = 0;
//
// groupBox5
//
this.groupBox5.Controls.Add(this.button6);
this.groupBox5.Controls.Add(this.textBox2);
this.groupBox5.Controls.Add(this.label2);
this.groupBox5.Controls.Add(this.button7);
this.groupBox5.Dock = System.Windows.Forms.DockStyle.Right;
this.groupBox5.Location = new System.Drawing.Point(744, 0);
this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(216, 333);
this.groupBox5.TabIndex = 0;
this.groupBox5.TabStop = false;
this.groupBox5.Text = "操作";
//
// button6
//
this.button6.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button6.Location = new System.Drawing.Point(71, 142);
this.button6.Name = "button6";
this.button6.Size = new System.Drawing.Size(75, 48);
this.button6.TabIndex = 1;
this.button6.Text = "查 询";
this.button6.Click += new System.EventHandler(this.button6_Click);
this.button6.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
// textBox2
//
this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.textBox2.Location = new System.Drawing.Point(20, 102);
this.textBox2.MaxLength = 5;
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(176, 26);
this.textBox2.TabIndex = 0;
this.textBox2.Text = "";
this.textBox2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
// label2
//
this.label2.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(20, 78);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(96, 23);
this.label2.TabIndex = 0;
this.label2.Text = "输入姓名:";
//
// button7
//
this.button7.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button7.Location = new System.Drawing.Point(71, 206);
this.button7.Name = "button7";
this.button7.Size = new System.Drawing.Size(75, 48);
this.button7.TabIndex = 2;
this.button7.Text = "返 回";
this.button7.Click += new System.EventHandler(this.button7_Click);
this.button7.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox2_KeyDown);
//
// oleDbDataAdapter1
//
this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;
this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;
this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;
this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "dzxxb", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("ICQ", "ICQ"),
new System.Data.Common.DataColumnMapping("OICQ", "OICQ"),
new System.Data.Common.DataColumnMapping("编号", "编号"),
new System.Data.Common.DataColumnMapping("单位", "单位"),
new System.Data.Common.DataColumnMapping("电子邮箱", "电子邮箱"),
new System.Data.Common.DataColumnMapping("手机", "手机"),
new System.Data.Common.DataColumnMapping("姓名", "姓名"),
new System.Data.Common.DataColumnMapping("性别", "性别")})});
this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;
//
// oleDbDeleteCommand1
//
this.oleDbDeleteCommand1.CommandText = "DELETE FROM dzxxb WHERE (编号 = ?) AND (ICQ = ? OR ? IS NULL AND ICQ IS NULL) AND (" +
"OICQ = ? OR ? IS NULL AND OICQ IS NULL) AND (单位 = ?) AND (姓名 = ?) AND (性别 = ?) A" +
"ND (手机 = ? OR ? IS NULL AND 手机 IS NULL) AND (电子邮箱 = ? OR ? IS NULL AND 电子邮箱 IS N" +
"ULL)";
this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_编号", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ICQ", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ICQ", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ICQ1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ICQ", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OICQ", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OICQ", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OICQ1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OICQ", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_单位", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_姓名", System.Data.OleDb.OleDbType.VarWChar, 5, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "姓名", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_性别", System.Data.OleDb.OleDbType.VarWChar, 1, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "性别", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_手机", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "手机", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_手机1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "手机", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电子邮箱", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电子邮箱", System.Data.DataRowVersion.Original, null));
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_电子邮箱1", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "电子邮箱", System.Data.DataRowVersion.Original, null));
//
// oleDbConnection1
//
this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Registry Path=;Data Source="".\tsglxt.mdb"";Jet OLEDB:System database=;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:Don't Copy Locale on Compact=False;User ID=Admin;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:Database Locking Mode=1;Jet OLEDB:SFP=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:Global Partial Bulk Ops=2;Mode=Share Deny None;Extended Properties=;Jet OLEDB:Engine Type=5";
//
// oleDbInsertCommand1
//
this.oleDbInsertCommand1.CommandText = "INSERT INTO dzxxb(ICQ, OICQ, 编号, 单位, 电子邮箱, 手机, 姓名, 性别) VALUES (?, ?, ?, ?, ?, ?, " +
"?, ?)";
this.oleDbInsertCommand1.Connection = this.oleDbConnection1;
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("ICQ", System.Data.OleDb.OleDbType.VarWChar, 20, "ICQ"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("OICQ", System.Data.OleDb.OleDbType.VarWChar, 20, "OICQ"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("编号", System.Data.OleDb.OleDbType.VarWChar, 10, "编号"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("单位", System.Data.OleDb.OleDbType.VarWChar, 30, "单位"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("电子邮箱", System.Data.OleDb.OleDbType.VarWChar, 30, "电子邮箱"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("手机", System.Data.OleDb.OleDbType.VarWChar, 20, "手机"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("姓名", System.Data.OleDb.OleDbType.VarWChar, 5, "姓名"));
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("性别", System.Data.OleDb.OleDbType.VarWChar, 1, "性别"));
//
// oleDbSelectCommand1
//
this.oleDbSelectCommand1.CommandText = "SELECT ICQ, OICQ, 编号, 单位, 电子邮箱, 手机, 姓名, 性别 FROM dzxxb";
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;
//
// oleDbUpdateCommand1
//
this.oleDbUpdateCommand1.CommandText = @"UPDATE dzxxb SET ICQ = ?, OICQ = ?, 编号 = ?, 单位 = ?, 电子邮箱 = ?, 手机 = ?, 姓名 = ?, 性别 = ? WHERE (编号 = ?) AND (ICQ = ? OR ? IS NULL AND ICQ IS NULL) AND (OICQ = ? OR ? IS NULL AND OICQ IS NULL) AND (单位 = ?) AND (姓名 = ?) AND (性别 = ?) AND (手机 = ? OR ? IS NULL AND 手机 IS NULL) AND (电子邮箱 = ? OR ? IS NULL AND 电子邮箱 IS NULL)";
this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("ICQ", System.Data.OleDb.OleDbType.VarWChar, 20, "ICQ"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("OICQ", System.Data.OleDb.OleDbType.VarWChar, 20, "OICQ"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("编号", System.Data.OleDb.OleDbType.VarWChar, 10, "编号"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("单位", System.Data.OleDb.OleDbType.VarWChar, 30, "单位"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("电子邮箱", System.Data.OleDb.OleDbType.VarWChar, 30, "电子邮箱"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("手机", System.Data.OleDb.OleDbType.VarWChar, 20, "手机"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("姓名", System.Data.OleDb.OleDbType.VarWChar, 5, "姓名"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("性别", System.Data.OleDb.OleDbType.VarWChar, 1, "性别"));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_编号", System.Data.OleDb.OleDbType.VarWChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ICQ", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ICQ", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ICQ1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "ICQ", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OICQ", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OICQ", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OICQ1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "OICQ", System.Data.DataRowVersion.Original, null));
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_单位", System.Data.OleDb.OleDbType.VarWChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "单位", System.Data.DataRowVersion.Original, null));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -