📄 fstuinfo.cs
字号:
this.label1.Text = "学号";
//
// button1
//
this.button1.ImageList = this.imageList1;
this.button1.Location = new System.Drawing.Point(16, 24);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(80, 24);
this.button1.TabIndex = 0;
this.button1.Text = "搜索";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(536, 24);
this.textBox3.Name = "textBox3";
this.textBox3.TabIndex = 5;
this.textBox3.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(352, 24);
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 4;
this.textBox2.Text = "";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(168, 24);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 3;
this.textBox1.Text = "";
//
// dataGrid1
//
this.dataGrid1.DataMember = "学生基本信息";
this.dataGrid1.DataSource = this.dataSet11;
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 152);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(696, 248);
this.dataGrid1.TabIndex = 2;
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// textBox4
//
this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.学号"));
this.textBox4.Location = new System.Drawing.Point(80, 408);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(96, 21);
this.textBox4.TabIndex = 3;
this.textBox4.Text = "";
//
// textBox5
//
this.textBox5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.姓名"));
this.textBox5.Location = new System.Drawing.Point(80, 448);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(96, 21);
this.textBox5.TabIndex = 4;
this.textBox5.Text = "";
//
// textBox6
//
this.textBox6.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.年龄"));
this.textBox6.Location = new System.Drawing.Point(80, 488);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(96, 21);
this.textBox6.TabIndex = 5;
this.textBox6.Text = "";
//
// textBox7
//
this.textBox7.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.出生年月"));
this.textBox7.Location = new System.Drawing.Point(320, 408);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(128, 21);
this.textBox7.TabIndex = 6;
this.textBox7.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(16, 416);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 16);
this.label4.TabIndex = 7;
this.label4.Text = "学号";
//
// label5
//
this.label5.Location = new System.Drawing.Point(16, 448);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 24);
this.label5.TabIndex = 8;
this.label5.Text = "姓名";
//
// label6
//
this.label6.Location = new System.Drawing.Point(16, 488);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(48, 24);
this.label6.TabIndex = 9;
this.label6.Text = "年龄";
//
// label7
//
this.label7.Location = new System.Drawing.Point(224, 416);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 16);
this.label7.TabIndex = 10;
this.label7.Text = "出生年月";
//
// label8
//
this.label8.Location = new System.Drawing.Point(224, 456);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(48, 16);
this.label8.TabIndex = 11;
this.label8.Text = "性别";
//
// textBox8
//
this.textBox8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.性别"));
this.textBox8.Location = new System.Drawing.Point(320, 448);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(128, 21);
this.textBox8.TabIndex = 12;
this.textBox8.Text = "";
//
// 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", "学生基本信息", 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("性别", "性别"),
new System.Data.Common.DataColumnMapping("院系", "院系"),
new System.Data.Common.DataColumnMapping("专业", "专业"),
new System.Data.Common.DataColumnMapping("班级", "班级")})});
this.sqlDataAdapter1.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM 学生基本信息 WHERE (学号 = @Original_学号) AND (专业 = @Original_专业 OR @Original_专业 IS NULL AND 专业 IS NULL) AND (出生年月 = @Original_出生年月) AND (姓名 = @Original_姓名) AND (年龄 = @Original_年龄) AND (性别 = @Original_性别) AND (班级 = @Original_班级 OR @Original_班级 IS NULL AND 班级 IS NULL) AND (院系 = @Original_院系)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_学号", System.Data.SqlDbType.VarChar, 16, 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("@Original_专业", System.Data.SqlDbType.VarChar, 16, 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("@Original_出生年月", System.Data.SqlDbType.DateTime, 8, 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("@Original_姓名", System.Data.SqlDbType.VarChar, 10, 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("@Original_年龄", System.Data.SqlDbType.Int, 4, 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("@Original_性别", System.Data.SqlDbType.VarChar, 4, 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("@Original_班级", System.Data.SqlDbType.VarChar, 10, 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("@Original_院系", System.Data.SqlDbType.VarChar, 12, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "院系", System.Data.DataRowVersion.Original, null));
//
// sqlConnection1
//
this.sqlConnection1.ConnectionString = "workstation id=3366359E777E4EE;packet size=4096;integrated security=SSPI;data sou" +
"rce=3366359E777E4EE;persist security info=False;initial catalog=jiaoshi";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO 学生基本信息(学号, 姓名, 年龄, 出生年月, 性别, 院系, 专业, 班级) VALUES (@学号, @姓名, @年龄, @出生年月" +
", @性别, @院系, @专业, @班级); SELECT 学号, 姓名, 年龄, 出生年月, 性别, 院系, 专业, 班级 FROM 学生基本信息 WHERE" +
" (学号 = @学号)";
this.sqlInsertCommand1.Connection = this.sqlConnection1;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@学号", System.Data.SqlDbType.VarChar, 16, "学号"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@姓名", System.Data.SqlDbType.VarChar, 10, "姓名"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@年龄", System.Data.SqlDbType.Int, 4, "年龄"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@出生年月", System.Data.SqlDbType.DateTime, 8, "出生年月"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@性别", System.Data.SqlDbType.VarChar, 4, "性别"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@院系", System.Data.SqlDbType.VarChar, 12, "院系"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@专业", System.Data.SqlDbType.VarChar, 16, "专业"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@班级", System.Data.SqlDbType.VarChar, 10, "班级"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 学号, 姓名, 年龄, 出生年月, 性别, 院系, 专业, 班级 FROM 学生基本信息 WHERE (学号 LIKE @a) AND (姓名 LI" +
"KE @b) AND (院系 LIKE @c)";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@a", System.Data.SqlDbType.VarChar, 50, "学号"));
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@b", System.Data.SqlDbType.VarChar, 50, "姓名"));
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@c", System.Data.SqlDbType.VarChar, 50, "院系"));
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE 学生基本信息 SET 学号 = @学号, 姓名 = @姓名, 年龄 = @年龄, 出生年月 = @出生年月, 性别 = @性别, 院系 = @院系, 专业 = @专业, 班级 = @班级 WHERE (学号 = @Original_学号) AND (专业 = @Original_专业 OR @Original_专业 IS NULL AND 专业 IS NULL) AND (出生年月 = @Original_出生年月) AND (姓名 = @Original_姓名) AND (年龄 = @Original_年龄) AND (性别 = @Original_性别) AND (班级 = @Original_班级 OR @Original_班级 IS NULL AND 班级 IS NULL) AND (院系 = @Original_院系); SELECT 学号, 姓名, 年龄, 出生年月, 性别, 院系, 专业, 班级 FROM 学生基本信息 WHERE (学号 = @学号)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@学号", System.Data.SqlDbType.VarChar, 16, "学号"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@姓名", System.Data.SqlDbType.VarChar, 10, "姓名"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@年龄", System.Data.SqlDbType.Int, 4, "年龄"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@出生年月", System.Data.SqlDbType.DateTime, 8, "出生年月"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@性别", System.Data.SqlDbType.VarChar, 4, "性别"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@院系", System.Data.SqlDbType.VarChar, 12, "院系"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@专业", System.Data.SqlDbType.VarChar, 16, "专业"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@班级", System.Data.SqlDbType.VarChar, 10, "班级"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_学号", System.Data.SqlDbType.VarChar, 16, 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.VarChar, 16, 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.DateTime, 8, 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.VarChar, 10, 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.Int, 4, 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.VarChar, 4, 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.VarChar, 10, 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.VarChar, 12, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "院系", System.Data.DataRowVersion.Original, null));
//
// label9
//
this.label9.Location = new System.Drawing.Point(224, 488);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 16);
this.label9.TabIndex = 13;
this.label9.Text = "院系";
//
// label10
//
this.label10.Location = new System.Drawing.Point(504, 408);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 16);
this.label10.TabIndex = 14;
this.label10.Text = "专业";
//
// label11
//
this.label11.Location = new System.Drawing.Point(504, 448);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(48, 24);
this.label11.TabIndex = 15;
this.label11.Text = "班级";
//
// textBox9
//
this.textBox9.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.院系"));
this.textBox9.Location = new System.Drawing.Point(320, 488);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(128, 21);
this.textBox9.TabIndex = 16;
this.textBox9.Text = "";
//
// textBox10
//
this.textBox10.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.专业"));
this.textBox10.Location = new System.Drawing.Point(584, 408);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(88, 21);
this.textBox10.TabIndex = 17;
this.textBox10.Text = "";
//
// textBox11
//
this.textBox11.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生基本信息.班级"));
this.textBox11.Location = new System.Drawing.Point(584, 448);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(88, 21);
this.textBox11.TabIndex = 18;
this.textBox11.Text = "";
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -