📄 courseinfo.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace 教师网上录入成绩
{
/// <summary>
/// CourseInfo 的摘要说明。
/// </summary>
public class CourseInfo : System.Windows.Forms.Form
{
private CurrencyManager cmOrders;//用于数据导航控制
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.GroupBox groupBox1;
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.ToolBarButton toolBarButton5;
private System.Windows.Forms.ToolBarButton toolBarButton6;
private System.Windows.Forms.ToolBarButton toolBarButton7;
private System.Windows.Forms.ToolBarButton toolBarButton8;
private System.Windows.Forms.ToolBarButton toolBarButton9;
private System.Windows.Forms.ToolBarButton toolBarButton10;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private 教师网上录入成绩.DataSet1 dataSet11;
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 System.ComponentModel.IContainer components;
public CourseInfo()
{
//
// 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(CourseInfo));
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.toolBarButton5 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton7 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton8 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton9 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton10 = new System.Windows.Forms.ToolBarButton();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataSet11 = new 教师网上录入成绩.DataSet1();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
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();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// 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.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(640, 41);
this.toolBar1.TabIndex = 0;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// toolBarButton1
//
this.toolBarButton1.ImageIndex = 4;
this.toolBarButton1.Text = "首记录";
//
// toolBarButton2
//
this.toolBarButton2.ImageIndex = 7;
this.toolBarButton2.Text = "下一记录";
//
// toolBarButton3
//
this.toolBarButton3.ImageIndex = 3;
this.toolBarButton3.Text = "上一记录";
//
// toolBarButton4
//
this.toolBarButton4.ImageIndex = 6;
this.toolBarButton4.Text = "尾记录";
//
// toolBarButton5
//
this.toolBarButton5.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButton6
//
this.toolBarButton6.ImageIndex = 2;
this.toolBarButton6.Text = "删除";
//
// toolBarButton7
//
this.toolBarButton7.ImageIndex = 9;
this.toolBarButton7.Text = "修改";
//
// toolBarButton8
//
this.toolBarButton8.ImageIndex = 0;
this.toolBarButton8.Text = "提交";
//
// toolBarButton9
//
this.toolBarButton9.ImageIndex = 8;
this.toolBarButton9.Text = "新增";
//
// toolBarButton10
//
this.toolBarButton10.ImageIndex = 5;
this.toolBarButton10.Text = "退出";
//
// 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;
//
// dataGrid1
//
this.dataGrid1.DataMember = "课程基本信息";
this.dataGrid1.DataSource = this.dataSet11;
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(32, 160);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(560, 160);
this.dataGrid1.TabIndex = 1;
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Location = new System.Drawing.Point(8, 64);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(632, 80);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(512, 32);
this.textBox3.Name = "textBox3";
this.textBox3.TabIndex = 6;
this.textBox3.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(344, 32);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(96, 21);
this.textBox2.TabIndex = 5;
this.textBox2.Text = "";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(160, 32);
this.textBox1.Name = "textBox1";
this.textBox1.TabIndex = 4;
this.textBox1.Text = "";
//
// label3
//
this.label3.Location = new System.Drawing.Point(448, 32);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 23);
this.label3.TabIndex = 3;
this.label3.Text = "开课教师";
//
// label2
//
this.label2.Location = new System.Drawing.Point(272, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 23);
this.label2.TabIndex = 2;
this.label2.Text = "课程名称";
//
// label1
//
this.label1.Location = new System.Drawing.Point(96, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 23);
this.label1.TabIndex = 1;
this.label1.Text = "课程编号";
//
// button1
//
this.button1.Location = new System.Drawing.Point(8, 32);
this.button1.Name = "button1";
this.button1.TabIndex = 0;
this.button1.Text = "查询";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// textBox4
//
this.textBox4.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "课程基本信息.课程编号"));
this.textBox4.Location = new System.Drawing.Point(136, 368);
this.textBox4.Name = "textBox4";
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(136, 416);
this.textBox5.Name = "textBox5";
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(136, 472);
this.textBox6.Name = "textBox6";
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(416, 368);
this.textBox7.Name = "textBox7";
this.textBox7.TabIndex = 6;
this.textBox7.Text = "";
//
// textBox8
//
this.textBox8.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "课程基本信息.开课系别"));
this.textBox8.Location = new System.Drawing.Point(416, 424);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(104, 21);
this.textBox8.TabIndex = 7;
this.textBox8.Text = "";
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -