📄 form1.cs
字号:
//
this.textBox2.Location = new System.Drawing.Point(96, 24);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(120, 21);
this.textBox2.TabIndex = 2;
this.textBox2.Text = "";
//
// groupBox2
//
this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.checkBox5,
this.checkBox4,
this.checkBox3,
this.checkBox2,
this.checkBox1,
this.label9,
this.label10,
this.label11,
this.label12,
this.label13,
this.textBox7,
this.textBox8,
this.textBox9,
this.textBox10,
this.textBox11});
this.groupBox2.Location = new System.Drawing.Point(232, 40);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(328, 184);
this.groupBox2.TabIndex = 5;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "旧数据";
//
// checkBox4
//
this.checkBox4.Location = new System.Drawing.Point(232, 120);
this.checkBox4.Name = "checkBox4";
this.checkBox4.Size = new System.Drawing.Size(88, 24);
this.checkBox4.TabIndex = 3;
this.checkBox4.Text = "逻辑与";
//
// checkBox3
//
this.checkBox3.Location = new System.Drawing.Point(232, 88);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(80, 24);
this.checkBox3.TabIndex = 3;
this.checkBox3.Text = "逻辑与";
//
// checkBox2
//
this.checkBox2.Location = new System.Drawing.Point(232, 56);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(80, 24);
this.checkBox2.TabIndex = 3;
this.checkBox2.Text = "逻辑与";
//
// checkBox1
//
this.checkBox1.Location = new System.Drawing.Point(232, 24);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(80, 24);
this.checkBox1.TabIndex = 3;
this.checkBox1.Text = "逻辑与";
//
// label9
//
this.label9.Location = new System.Drawing.Point(8, 152);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(72, 23);
this.label9.TabIndex = 1;
this.label9.Text = "资历简介:";
//
// label12
//
this.label12.Location = new System.Drawing.Point(8, 56);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(72, 23);
this.label12.TabIndex = 1;
this.label12.Text = "工作性质:";
//
// label13
//
this.label13.Location = new System.Drawing.Point(8, 24);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(72, 23);
this.label13.TabIndex = 1;
this.label13.Text = "律师姓名:";
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(96, 152);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(120, 21);
this.textBox7.TabIndex = 2;
this.textBox7.Text = "";
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(96, 120);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(120, 21);
this.textBox8.TabIndex = 2;
this.textBox8.Text = "";
//
// textBox11
//
this.textBox11.Location = new System.Drawing.Point(96, 24);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(120, 21);
this.textBox11.TabIndex = 2;
this.textBox11.Text = "";
//
// groupBox3
//
this.groupBox3.Controls.AddRange(new System.Windows.Forms.Control[] {
this.richTextBox1});
this.groupBox3.Location = new System.Drawing.Point(8, 232);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(224, 112);
this.groupBox3.TabIndex = 6;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "客户信息";
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(3, 17);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(218, 92);
this.richTextBox1.TabIndex = 4;
this.richTextBox1.Text = "";
//
// statusBar1
//
this.statusBar1.Location = new System.Drawing.Point(0, 353);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.statusBarPanel1});
this.statusBar1.ShowPanels = true;
this.statusBar1.Size = new System.Drawing.Size(560, 20);
this.statusBar1.TabIndex = 3;
//
// statusBarPanel1
//
this.statusBarPanel1.Width = 300;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(96, 8);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(224, 21);
this.textBox1.TabIndex = 2;
this.textBox1.Text = "";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 23);
this.label1.TabIndex = 1;
this.label1.Text = "监听端口:";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// button4
//
this.button4.Location = new System.Drawing.Point(272, 304);
this.button4.Name = "button4";
this.button4.TabIndex = 0;
this.button4.Text = "插入数据";
//
// button5
//
this.button5.Location = new System.Drawing.Point(368, 304);
this.button5.Name = "button5";
this.button5.TabIndex = 0;
this.button5.Text = "删除数据";
//
// button6
//
this.button6.Location = new System.Drawing.Point(464, 304);
this.button6.Name = "button6";
this.button6.TabIndex = 0;
this.button6.Text = "更新数据";
//
// button1
//
this.button1.Location = new System.Drawing.Point(272, 256);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "开始服务";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "表1", 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.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 律师姓名, 工作性质, 业务范围, 收费标准, 资历简介 FROM 表1";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO 表1(律师姓名, 工作性质, 业务范围, 收费标准, 资历简介) VALUES (@律师姓名, @工作性质, @业务范围, @收费标准, " +
"@资历简介); SELECT 律师姓名, 工作性质, 业务范围, 收费标准, 资历简介 FROM 表1 WHERE (律师姓名 = @Select_律师姓名)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@律师姓名", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "律师姓名", System.Data.DataRowVersion.Current, null));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工作性质", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "工作性质", System.Data.DataRowVersion.Current, null));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@业务范围", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "业务范围", System.Data.DataRowVersion.Current, null));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@收费标准", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "收费标准", System.Data.DataRowVersion.Current, null));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@资历简介", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "资历简介", System.Data.DataRowVersion.Current, null));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Select_律师姓名", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "律师姓名", System.Data.DataRowVersion.Current, null));
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE 表1 SET 律师姓名 = @律师姓名, 工作性质 = @工作性质, 业务范围 = @业务范围, 收费标准 = @收费标准, 资历简介 = @资历简介 WHERE (律师姓名 = @Original_律师姓名) AND (业务范围 = @Original_业务范围 OR @Original_业务范围1 IS NULL AND 业务范围 IS NULL) AND (工作性质 = @Original_工作性质 OR @Original_工作性质1 IS NULL AND 工作性质 IS NULL) AND (收费标准 = @Original_收费标准 OR @Original_收费标准1 IS NULL AND 收费标准 IS NULL) AND (资历简介 = @Original_资历简介 OR @Original_资历简介1 IS NULL AND 资历简介 IS NULL); SELECT 律师姓名, 工作性质, 业务范围, 收费标准, 资历简介 FROM 表1 WHERE (律师姓名 = @Select_律师姓名)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@律师姓名", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "律师姓名", System.Data.DataRowVersion.Current, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工作性质", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "工作性质", System.Data.DataRowVersion.Current, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@业务范围", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "业务范围", System.Data.DataRowVersion.Current, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@收费标准", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "收费标准", System.Data.DataRowVersion.Current, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@资历简介", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "资历简介", System.Data.DataRowVersion.Current, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_律师姓名", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "律师姓名", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_业务范围", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "业务范围", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_业务范围1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "业务范围", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工作性质", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "工作性质", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工作性质1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "工作性质", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_收费标准", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "收费标准", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_收费标准1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "收费标准", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_资历简介", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "资历简介", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_资历简介1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "资历简介", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Select_律师姓名", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "律师姓名", System.Data.DataRowVersion.Current, null));
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = "DELETE FROM 表1 WHERE (律师姓名 = @律师姓名) AND (业务范围 = @业务范围 OR @业务范围1 IS NULL AND 业务范围 " +
"IS NULL) AND (工作性质 = @工作性质 OR @工作性质1 IS NULL AND 工作性质 IS NULL) AND (收费标准 = @收费标准" +
" OR @收费标准1 IS NULL AND 收费标准 IS NULL) AND (资历简介 = @资历简介 OR @资历简介1 IS NULL AND 资历简" +
"介 IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@律师姓名", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "律师姓名", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@业务范围", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "业务范围", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@业务范围1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "业务范围", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工作性质", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "工作性质", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工作性质1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "工作性质", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@收费标准", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "收费标准", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@收费标准1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "收费标准", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@资历简介", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "资历简介", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@资历简介1", System.Data.SqlDbType.Char, 100, System.Data.ParameterDirection.Input, true, ((System.Byte)(0)), ((System.Byte)(0)), "资历简介", System.Data.DataRowVersion.Original, null));
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "data source=zhou;initial catalog=律所管理;persist security info=False;user id=sa;work" +
"station id=ZHOU;packet size=4096";
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
this.dataSet11.Namespace = "http://www.tempuri.org/DataSet1.xsd";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(560, 373);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.button6,
this.button5,
this.button4,
this.groupBox3,
this.groupBox2,
this.groupBox1,
this.button3,
this.statusBar1,
this.button2,
this.textBox1,
this.label1,
this.button1});
this.MaximizeBox = false;
this.Name = "Form1";
this.Text = "accep_send";
this.groupBox1.ResumeLayout(false);
this.groupBox2.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).EndInit();
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void button1_Click(object sender, System.EventArgs e)
{
try
{
port =Int32.Parse(textBox1.Text);
}
catch{MessageBox.Show("您输入的格式不对!请输入正整数。");}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -