📄 form2.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication1
{
/// <summary>
/// Form2 的摘要说明。
/// </summary>
public class Form2 : System.Windows.Forms.Form
{
// private System.Windows.Forms.Label label1;
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.Windows.Forms.RadioButton 女;
private System.Windows.Forms.Button 返回;
private System.Windows.Forms.TextBox sno;
private System.Windows.Forms.TextBox sname;
private System.Windows.Forms.TextBox birthday;
private System.Windows.Forms.TextBox all;
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.DataSet1 dataSet11;
private System.Windows.Forms.Button insert;
private System.Windows.Forms.TextBox department;
private System.Windows.Forms.TextBox memory;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.DataGrid dataGrid1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form2()
{
//
// 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.学号 = 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.sno = new System.Windows.Forms.TextBox();
this.dataSet11 = new WindowsApplication1.DataSet1();
this.sname = new System.Windows.Forms.TextBox();
this.department = new System.Windows.Forms.TextBox();
this.memory = new System.Windows.Forms.TextBox();
this.birthday = new System.Windows.Forms.TextBox();
this.all = new System.Windows.Forms.TextBox();
this.insert = new System.Windows.Forms.Button();
this.返回 = 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.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.label1 = new System.Windows.Forms.Label();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// 学号
//
this.学号.Location = new System.Drawing.Point(16, 56);
this.学号.Name = "学号";
this.学号.Size = new System.Drawing.Size(64, 16);
this.学号.TabIndex = 1;
this.学号.Text = "学号";
this.学号.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 姓名
//
this.姓名.Location = new System.Drawing.Point(16, 96);
this.姓名.Name = "姓名";
this.姓名.Size = new System.Drawing.Size(64, 16);
this.姓名.TabIndex = 2;
this.姓名.Text = "姓名";
this.姓名.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.姓名.Click += new System.EventHandler(this.姓名_Click);
//
// 专业名
//
this.专业名.Location = new System.Drawing.Point(16, 136);
this.专业名.Name = "专业名";
this.专业名.Size = new System.Drawing.Size(64, 16);
this.专业名.TabIndex = 3;
this.专业名.Text = "专业名";
this.专业名.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.专业名.Click += new System.EventHandler(this.专业名_Click);
//
// 备注
//
this.备注.Location = new System.Drawing.Point(16, 176);
this.备注.Name = "备注";
this.备注.Size = new System.Drawing.Size(64, 16);
this.备注.TabIndex = 4;
this.备注.Text = "备注";
this.备注.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 性别
//
this.性别.Location = new System.Drawing.Point(248, 56);
this.性别.Name = "性别";
this.性别.Size = new System.Drawing.Size(64, 16);
this.性别.TabIndex = 5;
this.性别.Text = "性别";
this.性别.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 出生日期
//
this.出生日期.Location = new System.Drawing.Point(240, 96);
this.出生日期.Name = "出生日期";
this.出生日期.Size = new System.Drawing.Size(64, 16);
this.出生日期.TabIndex = 6;
this.出生日期.Text = "出生日期";
this.出生日期.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.出生日期.Click += new System.EventHandler(this.出生日期_Click);
//
// 总学分
//
this.总学分.Location = new System.Drawing.Point(248, 144);
this.总学分.Name = "总学分";
this.总学分.Size = new System.Drawing.Size(64, 16);
this.总学分.TabIndex = 7;
this.总学分.Text = "总学分";
this.总学分.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// sno
//
this.sno.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "student.学号"));
this.sno.Location = new System.Drawing.Point(104, 56);
this.sno.Name = "sno";
this.sno.Size = new System.Drawing.Size(96, 21);
this.sno.TabIndex = 8;
this.sno.Text = "";
this.sno.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// dataSet11
//
this.dataSet11.DataSetName = "DataSet1";
this.dataSet11.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// sname
//
this.sname.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "student.姓名"));
this.sname.Location = new System.Drawing.Point(104, 96);
this.sname.Name = "sname";
this.sname.Size = new System.Drawing.Size(96, 21);
this.sname.TabIndex = 9;
this.sname.Text = "";
//
// department
//
this.department.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "student.专业名"));
this.department.Location = new System.Drawing.Point(104, 136);
this.department.Name = "department";
this.department.Size = new System.Drawing.Size(96, 21);
this.department.TabIndex = 10;
this.department.Text = "";
//
// memory
//
this.memory.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "student.备注"));
this.memory.Location = new System.Drawing.Point(104, 176);
this.memory.Name = "memory";
this.memory.Size = new System.Drawing.Size(352, 21);
this.memory.TabIndex = 11;
this.memory.Text = "";
this.memory.TextChanged += new System.EventHandler(this.textBox4_TextChanged);
//
// birthday
//
this.birthday.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "student.出生时间"));
this.birthday.Location = new System.Drawing.Point(328, 96);
this.birthday.Name = "birthday";
this.birthday.Size = new System.Drawing.Size(128, 21);
this.birthday.TabIndex = 14;
this.birthday.Text = "";
this.birthday.TextChanged += new System.EventHandler(this.birthday_TextChanged);
//
// all
//
this.all.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataSet11, "student.总学分"));
this.all.Location = new System.Drawing.Point(328, 136);
this.all.Name = "all";
this.all.Size = new System.Drawing.Size(128, 21);
this.all.TabIndex = 15;
this.all.Text = "";
//
// insert
//
this.insert.Location = new System.Drawing.Point(104, 208);
this.insert.Name = "insert";
this.insert.Size = new System.Drawing.Size(80, 24);
this.insert.TabIndex = 16;
this.insert.Text = "插入记录";
this.insert.Click += new System.EventHandler(this.insert_Click);
//
// 返回
//
this.返回.Location = new System.Drawing.Point(264, 208);
this.返回.Name = "返回";
this.返回.Size = new System.Drawing.Size(80, 24);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -