📄 courseinfo.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace 教务管理系统1
{
/// <summary>
/// CourseInfo 的摘要说明。
/// </summary>
public class CourseInfo : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txt1;
private System.Windows.Forms.TextBox txt2;
private System.Windows.Forms.Label label2;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private 教务管理系统1.DataSet1 dataSet11;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cmb1;
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.Button btnSearch;
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 CurrencyManager cmOrders;
private System.Data.SqlClient.SqlDataAdapter da1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txt8;
private System.Windows.Forms.TextBox txt7;
private System.Windows.Forms.ComboBox cmb2;
private System.Windows.Forms.ComboBox cmb3;
private System.Windows.Forms.ComboBox cmb4;
private System.Windows.Forms.ComboBox cmb5;
private System.Windows.Forms.ComboBox cmb6;
private System.Windows.Forms.Label label10;
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.Windows.Forms.ToolBarButton toolBarButton7;
private System.Windows.Forms.ToolBarButton toolBarButton8;
private System.Windows.Forms.ToolBarButton toolBarButton9;
private System.Windows.Forms.ToolBarButton toolBarButton10;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
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.groupBox1 = new System.Windows.Forms.GroupBox();
this.btnSearch = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txt2 = new System.Windows.Forms.TextBox();
this.txt1 = new System.Windows.Forms.TextBox();
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.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataSet11 = new 教务管理系统1.DataSet1();
this.cmb1 = new System.Windows.Forms.ComboBox();
this.da1 = 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.label3 = new System.Windows.Forms.Label();
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.txt8 = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.txt7 = new System.Windows.Forms.TextBox();
this.cmb2 = new System.Windows.Forms.ComboBox();
this.cmb3 = new System.Windows.Forms.ComboBox();
this.cmb4 = new System.Windows.Forms.ComboBox();
this.cmb5 = new System.Windows.Forms.ComboBox();
this.cmb6 = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
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.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btnSearch);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.txt2);
this.groupBox1.Controls.Add(this.txt1);
this.groupBox1.Location = new System.Drawing.Point(16, 64);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(552, 48);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
//
// btnSearch
//
this.btnSearch.Location = new System.Drawing.Point(16, 16);
this.btnSearch.Name = "btnSearch";
this.btnSearch.TabIndex = 4;
this.btnSearch.Text = "搜索";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// label2
//
this.label2.Location = new System.Drawing.Point(256, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 23);
this.label2.TabIndex = 3;
this.label2.Text = "课程名";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label1
//
this.label1.Location = new System.Drawing.Point(80, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(80, 23);
this.label1.TabIndex = 2;
this.label1.Text = "课程号";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// txt2
//
this.txt2.Location = new System.Drawing.Point(320, 16);
this.txt2.Name = "txt2";
this.txt2.Size = new System.Drawing.Size(144, 21);
this.txt2.TabIndex = 1;
this.txt2.Text = "";
//
// txt1
//
this.txt1.Location = new System.Drawing.Point(160, 16);
this.txt1.Name = "txt1";
this.txt1.Size = new System.Drawing.Size(88, 21);
this.txt1.TabIndex = 0;
this.txt1.Text = "";
//
// 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(656, 56);
this.toolBar1.TabIndex = 1;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// 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
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -