📄 查询条件.cs
字号:
namespace 毕业设计
{
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace 软件系统
{
/// <summary>
/// StudentFrom 的摘要说明。
/// </summary>
public class 查询条件 : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button QuerySno;
private System.Windows.Forms.TextBox txtSno;
private System.Windows.Forms.TextBox txtSname;
private System.Windows.Forms.Button QuerySname;
private System.Windows.Forms.Button btnExit;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public 查询条件()
{
//
// 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.QuerySno = new System.Windows.Forms.Button();
this.txtSno = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtSname = new System.Windows.Forms.TextBox();
this.QuerySname = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 23);
this.label1.TabIndex = 0;
this.label1.Text = "学号";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// QuerySno
//
this.QuerySno.Location = new System.Drawing.Point(192, 24);
this.QuerySno.Name = "QuerySno";
this.QuerySno.TabIndex = 1;
this.QuerySno.Text = "查询";
this.QuerySno.Click += new System.EventHandler(this.QuerySno_Click);
//
// txtSno
//
this.txtSno.Location = new System.Drawing.Point(72, 24);
this.txtSno.Name = "txtSno";
this.txtSno.TabIndex = 2;
this.txtSno.Text = "";
//
// label2
//
this.label2.Location = new System.Drawing.Point(0, 72);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(72, 23);
this.label2.TabIndex = 3;
this.label2.Text = "姓名";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// txtSname
//
this.txtSname.Location = new System.Drawing.Point(72, 72);
this.txtSname.Name = "txtSname";
this.txtSname.TabIndex = 4;
this.txtSname.Text = "";
//
// QuerySname
//
this.QuerySname.Location = new System.Drawing.Point(192, 72);
this.QuerySname.Name = "QuerySname";
this.QuerySname.TabIndex = 5;
this.QuerySname.Text = "查询";
this.QuerySname.Click += new System.EventHandler(this.QuerySname_Click);
//
// btnExit
//
this.btnExit.Location = new System.Drawing.Point(112, 112);
this.btnExit.Name = "btnExit";
this.btnExit.TabIndex = 6;
this.btnExit.Text = "关闭";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// StudentFrom
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(292, 142);
this.Controls.Add(this.btnExit);
this.Controls.Add(this.QuerySname);
this.Controls.Add(this.txtSname);
this.Controls.Add(this.txtSno);
this.Controls.Add(this.label2);
this.Controls.Add(this.QuerySno);
this.Controls.Add(this.label1);
this.Name = "StudentFrom";
this.Text = "学生查询";
this.ResumeLayout(false);
}
#endregion
private void btnExit_Click(object sender, System.EventArgs e)
{
this.Dispose(true);
}
private void QuerySno_Click(object sender, System.EventArgs e)
{
if(txtSno.Text.Trim()!="")
{
毕业设计.软件系统.查询结果 o=new 毕业设计.软件系统.查询结果();
o.type="QuerySno";
o.querys=txtSno.Text.Trim();
this.Dispose(true);
o.ShowDialog(this.Parent);
}
}
private void QuerySname_Click(object sender, System.EventArgs e)
{
if(txtSname.Text.Trim()!="")
{
毕业设计.软件系统.查询结果 o=new 毕业设计.软件系统.查询结果();
o.type="QuerySname";
o.querys=txtSname.Text.Trim();
this.Dispose(true);
o.ShowDialog(this.Parent);
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -