📄 formemployeehistory.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data ;
namespace BlueHill.BlueHillWindows.SalaryManagement
{
public class FormEmployeeHistory : System.Windows.Forms.Form
{
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.Button btnOk;
private System.ComponentModel.Container components = null;
Salary sm=new Salary();
private string data;
public FormEmployeeHistory(string data)
{
InitializeComponent();
this.data =data;
}
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.btnOk = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.CaptionBackColor = System.Drawing.Color.Blue;
this.dataGrid1.DataMember = "";
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(16, 16);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(344, 296);
this.dataGrid1.TabIndex = 0;
//
// btnOk
//
this.btnOk.Location = new System.Drawing.Point(288, 328);
this.btnOk.Name = "btnOk";
this.btnOk.TabIndex = 1;
this.btnOk.Text = "确定";
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// FormEmployeeHistory
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(376, 357);
this.Controls.Add(this.btnOk);
this.Controls.Add(this.dataGrid1);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "FormEmployeeHistory";
this.Text = "员工薪资历史记录";
this.Load += new System.EventHandler(this.FormEmployeeHistory_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void FormEmployeeHistory_Load(object sender, System.EventArgs e)
{
DataTable dt=sm.HistorySalary(this.data );
dataGrid1.DataSource =dt;
}
private void btnOk_Click(object sender, System.EventArgs e)
{
this.Close ();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -