📄 teacaddgrade.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace 教师网上录入成绩
{
/// <summary>
/// TeacAddGrade 的摘要说明。
/// </summary>
public class TeacAddGrade : System.Windows.Forms.Form
{
private CurrencyManager cmOrders;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button3;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private 教师网上录入成绩.DataSet8 dataSet81;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Label label5;
private System.ComponentModel.IContainer components;
public TeacAddGrade()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TeacAddGrade));
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataSet81 = new 教师网上录入成绩.DataSet8();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button3 = 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.button4 = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet81)).BeginInit();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.DataMember = "选课信息表";
this.dataGrid1.DataSource = this.dataSet81;
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(16, 152);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(400, 304);
this.dataGrid1.TabIndex = 0;
//
// dataSet81
//
this.dataSet81.DataSetName = "DataSet8";
this.dataSet81.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3,
this.toolBarButton4});
this.toolBar1.DropDownArrows = true;
this.toolBar1.ImageList = this.imageList1;
this.toolBar1.Location = new System.Drawing.Point(0, 0);
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(712, 41);
this.toolBar1.TabIndex = 1;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// toolBarButton1
//
this.toolBarButton1.ImageIndex = 1;
this.toolBarButton1.Text = "首记录";
//
// toolBarButton2
//
this.toolBarButton2.ImageIndex = 3;
this.toolBarButton2.Text = "下记录";
//
// toolBarButton3
//
this.toolBarButton3.ImageIndex = 0;
this.toolBarButton3.Text = "上记录";
//
// toolBarButton4
//
this.toolBarButton4.ImageIndex = 2;
this.toolBarButton4.Text = "尾记录";
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(72, 24);
this.label1.TabIndex = 2;
this.label1.Text = "课程编号";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 40);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 32);
this.label2.TabIndex = 3;
this.label2.Text = "学号";
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 88);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 32);
this.label3.TabIndex = 4;
this.label3.Text = "课程编号";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Location = new System.Drawing.Point(16, 48);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(392, 96);
this.groupBox1.TabIndex = 5;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "选择课程";
//
// button1
//
this.button1.Location = new System.Drawing.Point(256, 40);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(112, 23);
this.button1.TabIndex = 7;
this.button1.Text = "查询(开始录入)";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(128, 40);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(104, 21);
this.textBox1.TabIndex = 6;
this.textBox1.Text = "";
//
// textBox2
//
this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet81, "选课信息表.学号"));
this.textBox2.Location = new System.Drawing.Point(104, 40);
this.textBox2.Name = "textBox2";
this.textBox2.TabIndex = 7;
this.textBox2.Text = "";
//
// textBox3
//
this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet81, "选课信息表.课程编号"));
this.textBox3.Location = new System.Drawing.Point(104, 88);
this.textBox3.Name = "textBox3";
this.textBox3.TabIndex = 8;
this.textBox3.Text = "";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 144);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 32);
this.label4.TabIndex = 9;
this.label4.Text = "成绩";
//
// textBox4
//
this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet81, "选课信息表.成绩"));
this.textBox4.Location = new System.Drawing.Point(104, 144);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(96, 21);
this.textBox4.TabIndex = 10;
this.textBox4.Text = "";
//
// button2
//
this.button2.Location = new System.Drawing.Point(560, 400);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(120, 32);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -