📄 studentinfo.cs
字号:
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label9
//
this.label9.Location = new System.Drawing.Point(176, 480);
this.label9.Name = "label9";
this.label9.TabIndex = 14;
this.label9.Text = "所属院系";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// label10
//
this.label10.Location = new System.Drawing.Point(392, 480);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(32, 23);
this.label10.TabIndex = 15;
this.label10.Text = "年级";
this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM 学生表 WHERE (学号 = @Original_学号) AND (出生日期 = @Original_出生日期 OR @Original_出生日期 IS NULL AND 出生日期 IS NULL) AND (姓名 = @Original_姓名 OR @Original_姓名 IS NULL AND 姓名 IS NULL) AND (年级 = @Original_年级) AND (性别 = @Original_性别 OR @Original_性别 IS NULL AND 性别 IS NULL) AND (所属院系 = @Original_所属院系 OR @Original_所属院系 IS NULL AND 所属院系 IS NULL) AND (班级名称 = @Original_班级名称 OR @Original_班级名称 IS NULL AND 班级名称 IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection1;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_学号", System.Data.SqlDbType.VarChar, 6, 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, 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.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, 2, 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, 30, 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, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "班级名称", System.Data.DataRowVersion.Original, null));
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE 学生表 SET 学号 = @学号, 姓名 = @姓名, 性别 = @性别, 出生日期 = @出生日期, 班级名称 = @班级名称, 所属院系 = @所属院系, 年级 = @年级 WHERE (学号 = @Original_学号) AND (出生日期 = @Original_出生日期 OR @Original_出生日期 IS NULL AND 出生日期 IS NULL) AND (姓名 = @Original_姓名 OR @Original_姓名 IS NULL AND 姓名 IS NULL) AND (年级 = @Original_年级) AND (性别 = @Original_性别 OR @Original_性别 IS NULL AND 性别 IS NULL) AND (所属院系 = @Original_所属院系 OR @Original_所属院系 IS NULL AND 所属院系 IS NULL) AND (班级名称 = @Original_班级名称 OR @Original_班级名称 IS NULL AND 班级名称 IS NULL); SELECT 学号, 姓名, 性别, 出生日期, 班级名称, 所属院系, 年级 FROM 学生表 WHERE (学号 = @学号)";
this.sqlUpdateCommand1.Connection = this.sqlConnection1;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@学号", System.Data.SqlDbType.VarChar, 6, "学号"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@姓名", System.Data.SqlDbType.VarChar, 8, "姓名"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@性别", System.Data.SqlDbType.VarChar, 2, "性别"));
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, 30, "班级名称"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@所属院系", System.Data.SqlDbType.VarChar, 30, "所属院系"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@年级", System.Data.SqlDbType.Int, 4, "年级"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_学号", System.Data.SqlDbType.VarChar, 6, 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, 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.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, 2, 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, 30, 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, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "班级名称", System.Data.DataRowVersion.Original, null));
//
// 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, 6, "学号"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@姓名", System.Data.SqlDbType.VarChar, 8, "姓名"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@性别", System.Data.SqlDbType.VarChar, 2, "性别"));
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, 30, "班级名称"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@所属院系", System.Data.SqlDbType.VarChar, 30, "所属院系"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@年级", System.Data.SqlDbType.Int, 4, "年级"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 学号, 姓名, 性别, 出生日期, 班级名称, 所属院系, 年级 FROM 学生表 WHERE (学号 LIKE @Param4) AND (姓名 " +
"LIKE @Param5) AND (年级 LIKE @Param6)";
this.sqlSelectCommand1.Connection = this.sqlConnection1;
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param4", System.Data.SqlDbType.VarChar, 6, "学号"));
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param5", System.Data.SqlDbType.VarChar, 8, "姓名"));
this.sqlSelectCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Param6", System.Data.SqlDbType.Int, 4, "年级"));
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3,
this.toolBarButton4,
this.toolBarButton5,
this.toolBarButton6,
this.toolBarButton7,
this.toolBarButton8,
this.toolBarButton9,
this.toolBarButton10});
this.toolBar1.ButtonSize = new System.Drawing.Size(60, 50);
this.toolBar1.DropDownArrows = true;
this.toolBar1.Location = new System.Drawing.Point(0, 0);
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(688, 56);
this.toolBar1.TabIndex = 16;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick_1);
//
// toolBarButton1
//
this.toolBarButton1.Text = "首记录";
this.toolBarButton1.ToolTipText = "首记录";
//
// toolBarButton2
//
this.toolBarButton2.Text = "上一记录";
this.toolBarButton2.ToolTipText = "上一记录";
//
// toolBarButton3
//
this.toolBarButton3.Text = "下一记录";
this.toolBarButton3.ToolTipText = "下一记录";
//
// toolBarButton4
//
this.toolBarButton4.Text = "尾记录";
this.toolBarButton4.ToolTipText = "尾记录";
//
// toolBarButton5
//
this.toolBarButton5.Text = "添加";
this.toolBarButton5.ToolTipText = "添加";
//
// toolBarButton6
//
this.toolBarButton6.Text = "修改";
this.toolBarButton6.ToolTipText = "修改";
//
// dateTimePicker1
//
this.dateTimePicker1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生表.出生日期"));
this.dateTimePicker1.Enabled = false;
this.dateTimePicker1.Location = new System.Drawing.Point(392, 448);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(112, 21);
this.dateTimePicker1.TabIndex = 17;
//
// cmb3
//
this.cmb3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生表.学制"));
this.cmb3.Enabled = false;
this.cmb3.Items.AddRange(new object[] {
"1",
"2",
"3",
"4",
"5"});
this.cmb3.Location = new System.Drawing.Point(504, 504);
this.cmb3.Name = "cmb3";
this.cmb3.Size = new System.Drawing.Size(64, 20);
this.cmb3.TabIndex = 18;
//
// label3
//
this.label3.Location = new System.Drawing.Point(496, 480);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(40, 23);
this.label3.TabIndex = 19;
this.label3.Text = "学制";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// cmb4
//
this.cmb4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生表.班级名称"));
this.cmb4.DataSource = this.dataSet11.学生表;
this.cmb4.DisplayMember = "班级名称";
this.cmb4.Enabled = false;
this.cmb4.Location = new System.Drawing.Point(32, 504);
this.cmb4.Name = "cmb4";
this.cmb4.Size = new System.Drawing.Size(112, 20);
this.cmb4.TabIndex = 20;
//
// cmb5
//
this.cmb5.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "学生表.所属院系"));
this.cmb5.DataSource = this.dataSet11.学生表;
this.cmb5.DisplayMember = "所属院系";
this.cmb5.Enabled = false;
this.cmb5.Location = new System.Drawing.Point(176, 504);
this.cmb5.Name = "cmb5";
this.cmb5.Size = new System.Drawing.Size(176, 20);
this.cmb5.TabIndex = 21;
//
// toolBarButton7
//
this.toolBarButton7.Text = "删除";
this.toolBarButton7.ToolTipText = "删除";
//
// toolBarButton8
//
this.toolBarButton8.Text = "提交";
this.toolBarButton8.ToolTipText = "提交";
//
// toolBarButton9
//
this.toolBarButton9.Text = "取消";
this.toolBarButton9.ToolTipText = "取消";
//
// toolBarButton10
//
this.toolBarButton10.Text = "退出";
this.toolBarButton10.ToolTipText = "退出";
//
// StudentInfo
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(688, 550);
this.Controls.Add(this.cmb5);
this.Controls.Add(this.cmb4);
this.Controls.Add(this.txt5);
this.Controls.Add(this.txt4);
this.Controls.Add(this.label3);
this.Controls.Add(this.cmb3);
this.Controls.Add(this.dateTimePicker1);
this.Controls.Add(this.toolBar1);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -