📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
namespace 人员基本信息管理主界面
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
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;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.ComboBox comboBox4;
private System.Windows.Forms.ComboBox comboBox5;
private System.Windows.Forms.ComboBox comboBox6;
public System.Data.DataSet myDataSet;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
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.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.comboBox6 = new System.Windows.Forms.ComboBox();
this.comboBox5 = new System.Windows.Forms.ComboBox();
this.comboBox4 = new System.Windows.Forms.ComboBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
this.comboBox3,
this.comboBox2,
this.comboBox1,
this.label3,
this.label2,
this.label1});
this.groupBox1.ForeColor = System.Drawing.SystemColors.Desktop;
this.groupBox1.Location = new System.Drawing.Point(16, 64);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(192, 184);
this.groupBox1.TabIndex = 1;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "查询项";
//
// comboBox3
//
this.comboBox3.Items.AddRange(new object[] {
"姓名",
"工号",
"性别",
"身份证号码",
"家庭住址",
"联系方式",
"民族",
"学历",
"出生日期",
"专业",
"籍贯",
"毕业学校",
"政治面貌",
"毕业时间",
"参加工作时间",
"进入公司时间",
"职务",
"职称",
"职称评定时间",
"档案工资",
"调整时间",
"岗薪工资",
"参保种类",
"参保时间",
"参保额",
"档案存放地",
"档案号",
"岗位变动时间",
"变动岗位",
"离职时间",
"试用信息"});
this.comboBox3.Location = new System.Drawing.Point(96, 136);
this.comboBox3.Name = "comboBox3";
this.comboBox3.Size = new System.Drawing.Size(80, 20);
this.comboBox3.TabIndex = 5;
//
// comboBox2
//
this.comboBox2.Items.AddRange(new object[] {
"姓名",
"工号",
"性别",
"身份证号码",
"家庭住址",
"联系方式",
"民族",
"学历",
"出生日期",
"专业",
"籍贯",
"毕业学校",
"政治面貌",
"毕业时间",
"参加工作时间",
"进入公司时间",
"职务",
"职称",
"职称评定时间",
"档案工资",
"调整时间",
"岗薪工资",
"参保种类",
"参保时间",
"参保额",
"档案存放地",
"档案号",
"岗位变动时间",
"变动岗位",
"离职时间",
"试用信息"});
this.comboBox2.Location = new System.Drawing.Point(96, 88);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(80, 20);
this.comboBox2.TabIndex = 4;
//
// comboBox1
//
this.comboBox1.Items.AddRange(new object[] {
"姓名",
"工号",
"性别",
"身份证号码",
"家庭住址",
"联系方式",
"民族",
"学历",
"出生日期",
"专业",
"籍贯",
"毕业学校",
"政治面貌",
"毕业时间",
"参加工作时间",
"进入公司时间",
"职务",
"职称",
"职称评定时间",
"档案工资",
"调整时间",
"岗薪工资",
"参保种类",
"参保时间",
"参保额",
"档案存放地",
"档案号",
"岗位变动时间",
"变动岗位",
"离职时间",
"试用信息"});
this.comboBox1.Location = new System.Drawing.Point(96, 40);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(80, 20);
this.comboBox1.TabIndex = 3;
//
// label3
//
this.label3.Location = new System.Drawing.Point(8, 136);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 24);
this.label3.TabIndex = 2;
this.label3.Text = "查询项3";
//
// label2
//
this.label2.Location = new System.Drawing.Point(8, 88);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 24);
this.label2.TabIndex = 1;
this.label2.Text = "查询项2";
//
// label1
//
this.label1.Location = new System.Drawing.Point(8, 40);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 24);
this.label1.TabIndex = 0;
this.label1.Text = "查询项1";
//
// groupBox2
//
this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
this.textBox3,
this.textBox2,
this.textBox1,
this.label7,
this.label8,
this.label9});
this.groupBox2.ForeColor = System.Drawing.SystemColors.Desktop;
this.groupBox2.Location = new System.Drawing.Point(432, 64);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(176, 184);
this.groupBox2.TabIndex = 2;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "查询值";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(88, 136);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(72, 21);
this.textBox3.TabIndex = 6;
this.textBox3.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(88, 88);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(72, 21);
this.textBox2.TabIndex = 5;
this.textBox2.Text = "";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(88, 40);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(72, 21);
this.textBox1.TabIndex = 4;
this.textBox1.Text = "";
//
// label7
//
this.label7.Location = new System.Drawing.Point(8, 136);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 24);
this.label7.TabIndex = 2;
this.label7.Text = "查询值3";
//
// label8
//
this.label8.Location = new System.Drawing.Point(8, 88);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(64, 24);
this.label8.TabIndex = 1;
this.label8.Text = "查询值2";
//
// label9
//
this.label9.Location = new System.Drawing.Point(8, 40);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(64, 24);
this.label9.TabIndex = 0;
this.label9.Text = "查询值1";
//
// label6
//
this.label6.Location = new System.Drawing.Point(8, 40);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(64, 24);
this.label6.TabIndex = 3;
this.label6.Text = "查询条件1";
//
// label5
//
this.label5.Location = new System.Drawing.Point(8, 88);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(64, 24);
this.label5.TabIndex = 2;
this.label5.Text = "查询条件2";
//
// label4
//
this.label4.Location = new System.Drawing.Point(8, 136);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 24);
this.label4.TabIndex = 1;
this.label4.Text = "查询条件3";
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -