📄 form5.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication1
{
/// <summary>
/// Form5 的摘要说明。
/// </summary>
public class Form5 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button 返回;
private System.Windows.Forms.Button insert;
private System.Windows.Forms.TextBox all;
private System.Windows.Forms.TextBox birthday;
private System.Windows.Forms.TextBox memory;
private System.Windows.Forms.TextBox department;
private System.Windows.Forms.TextBox sname;
private System.Windows.Forms.TextBox sno;
private System.Windows.Forms.Label 总学分;
private System.Windows.Forms.Label 出生日期;
private System.Windows.Forms.Label 性别;
private System.Windows.Forms.Label 备注;
private System.Windows.Forms.Label 专业名;
private System.Windows.Forms.Label 姓名;
private System.Windows.Forms.Label 学号;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
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.Data.SqlClient.SqlConnection sqlConnection1;
private WindowsApplication1.DataSet3 dataSet31;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form5()
{
//
// 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.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.dataSet31 = new WindowsApplication1.DataSet3();
this.返回 = new System.Windows.Forms.Button();
this.insert = new System.Windows.Forms.Button();
this.all = new System.Windows.Forms.TextBox();
this.birthday = new System.Windows.Forms.TextBox();
this.memory = new System.Windows.Forms.TextBox();
this.department = new System.Windows.Forms.TextBox();
this.sname = new System.Windows.Forms.TextBox();
this.sno = new System.Windows.Forms.TextBox();
this.总学分 = new System.Windows.Forms.Label();
this.出生日期 = new System.Windows.Forms.Label();
this.性别 = new System.Windows.Forms.Label();
this.备注 = new System.Windows.Forms.Label();
this.专业名 = new System.Windows.Forms.Label();
this.姓名 = new System.Windows.Forms.Label();
this.学号 = 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();
this.label3 = new System.Windows.Forms.Label();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
((System.ComponentModel.ISupportInitialize)(this.dataSet31)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(488, 32);
this.label1.TabIndex = 0;
this.label1.Text = "学生信息修改";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 48);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(488, 200);
this.label2.TabIndex = 1;
//
// dataSet31
//
this.dataSet31.DataSetName = "DataSet3";
this.dataSet31.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// 返回
//
this.返回.Location = new System.Drawing.Point(332, 216);
this.返回.Name = "返回";
this.返回.Size = new System.Drawing.Size(80, 24);
this.返回.TabIndex = 35;
this.返回.Text = "返回";
//
// insert
//
this.insert.Location = new System.Drawing.Point(180, 216);
this.insert.Name = "insert";
this.insert.Size = new System.Drawing.Size(80, 24);
this.insert.TabIndex = 34;
this.insert.Text = "修改记录";
this.insert.Click += new System.EventHandler(this.insert_Click);
//
// all
//
this.all.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet31, "student.总学分"));
this.all.Location = new System.Drawing.Point(336, 128);
this.all.Name = "all";
this.all.Size = new System.Drawing.Size(80, 21);
this.all.TabIndex = 33;
this.all.Text = "";
//
// birthday
//
this.birthday.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet31, "student.出生时间"));
this.birthday.Location = new System.Drawing.Point(336, 96);
this.birthday.Name = "birthday";
this.birthday.Size = new System.Drawing.Size(80, 21);
this.birthday.TabIndex = 32;
this.birthday.Text = "";
//
// memory
//
this.memory.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet31, "student.总学分"));
this.memory.Location = new System.Drawing.Point(104, 176);
this.memory.Name = "memory";
this.memory.Size = new System.Drawing.Size(304, 21);
this.memory.TabIndex = 31;
this.memory.Text = "";
//
// department
//
this.department.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet31, "student.专业名"));
this.department.Location = new System.Drawing.Point(104, 136);
this.department.Name = "department";
this.department.Size = new System.Drawing.Size(80, 21);
this.department.TabIndex = 30;
this.department.Text = "";
//
// sname
//
this.sname.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet31, "student.姓名"));
this.sname.Location = new System.Drawing.Point(104, 104);
this.sname.Name = "sname";
this.sname.Size = new System.Drawing.Size(80, 21);
this.sname.TabIndex = 29;
this.sname.Text = "";
//
// sno
//
this.sno.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet31, "student.学号"));
this.sno.Location = new System.Drawing.Point(104, 64);
this.sno.Name = "sno";
this.sno.Size = new System.Drawing.Size(80, 21);
this.sno.TabIndex = 28;
this.sno.Text = "";
//
// 总学分
//
this.总学分.Location = new System.Drawing.Point(256, 136);
this.总学分.Name = "总学分";
this.总学分.Size = new System.Drawing.Size(64, 16);
this.总学分.TabIndex = 27;
this.总学分.Text = "总学分";
this.总学分.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 出生日期
//
this.出生日期.Location = new System.Drawing.Point(264, 104);
this.出生日期.Name = "出生日期";
this.出生日期.Size = new System.Drawing.Size(64, 16);
this.出生日期.TabIndex = 26;
this.出生日期.Text = "出生日期";
this.出生日期.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 性别
//
this.性别.Location = new System.Drawing.Point(256, 64);
this.性别.Name = "性别";
this.性别.Size = new System.Drawing.Size(64, 16);
this.性别.TabIndex = 25;
this.性别.Text = "性别";
this.性别.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 备注
//
this.备注.Location = new System.Drawing.Point(24, 176);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -