📄 studentinfo.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>
/// StudentInfo 的摘要说明。
/// </summary>
public class StudentInfo : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dataGrid1;
protected System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txt1;
private System.Windows.Forms.TextBox txt2;
private System.Data.SqlClient.SqlDataAdapter da1;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.Windows.Forms.Label lable4;
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.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txt4;
private System.Windows.Forms.TextBox txt5;
private System.Windows.Forms.ComboBox cmb1;
private System.Windows.Forms.ComboBox cmb2;
private 教务管理系统1.DataSet1 dataSet11;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
protected System.Windows.Forms.Button btnSearch;
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.ToolBarButton toolBarButton5;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
private System.Data.SqlClient.SqlConnection sqlConnection2;
private System.Data.SqlClient.SqlConnection sqlConnection3;
private System.Data.SqlClient.SqlConnection sqlConnection4;
private System.Data.SqlClient.SqlConnection sqlConnection5;
private System.Windows.Forms.ToolBarButton toolBarButton6;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cmb3;
private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
private System.Data.SqlClient.SqlCommand sqlInsertCommand2;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand2;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand2;
private System.Windows.Forms.ComboBox cmb4;
private System.Windows.Forms.ComboBox cmb5;
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 CurrencyManager cmOrders;
private void StudentInfo_Load(object sender,System.EventArgs e)
{
da1.SelectCommand.Parameters[0].Value="%%";
da1.SelectCommand.Parameters[1].Value="%%";
da1.Fill(dataSet11.学生表);
cmOrders=(CurrencyManager) BindingContext[dataSet11,"学生表"];
}
public StudentInfo()
{
//
// 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.dataGrid1 = new System.Windows.Forms.DataGrid();
this.dataSet11 = new 教务管理系统1.DataSet1();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txt2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txt1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnSearch = new System.Windows.Forms.Button();
this.da1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection2 = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection4 = new System.Data.SqlClient.SqlConnection();
this.sqlConnection3 = new System.Data.SqlClient.SqlConnection();
this.sqlConnection5 = new System.Data.SqlClient.SqlConnection();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
this.txt4 = new System.Windows.Forms.TextBox();
this.txt5 = new System.Windows.Forms.TextBox();
this.cmb1 = new System.Windows.Forms.ComboBox();
this.cmb2 = new System.Windows.Forms.ComboBox();
this.lable4 = 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.label10 = new System.Windows.Forms.Label();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
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.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.cmb3 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.cmb4 = new System.Windows.Forms.ComboBox();
this.cmb5 = new System.Windows.Forms.ComboBox();
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();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.CaptionVisible = false;
this.dataGrid1.DataBindings.Add(new System.Windows.Forms.Binding("DataSource", this.dataSet11, "学生表"));
this.dataGrid1.DataMember = "";
this.dataGrid1.DataSource = this.dataSet11.学生表;
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(8, 144);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.ReadOnly = true;
this.dataGrid1.Size = new System.Drawing.Size(560, 256);
this.dataGrid1.TabIndex = 0;
this.dataGrid1.Navigate += new System.Windows.Forms.NavigateEventHandler(this.dataGrid1_Navigate);
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txt2);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.txt1);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.btnSearch);
this.groupBox1.Location = new System.Drawing.Point(24, 80);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(496, 48);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
//
// txt2
//
this.txt2.Location = new System.Drawing.Point(384, 16);
this.txt2.Name = "txt2";
this.txt2.Size = new System.Drawing.Size(80, 21);
this.txt2.TabIndex = 4;
this.txt2.Text = "";
this.txt2.TextChanged += new System.EventHandler(this.txt2_TextChanged);
//
// label2
//
this.label2.Location = new System.Drawing.Point(320, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 23);
this.label2.TabIndex = 3;
this.label2.Text = "姓名";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// txt1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -