📄 wage.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
using ManPowerManage.BussinessRule;
namespace ManPowerManage.UILevel
{
/// <summary>
/// Wage 的摘要说明。
/// </summary>
public class Wage : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Button btnApply;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Button btnSearchCancel;
private System.Windows.Forms.DateTimePicker dateTimePicker2;
private System.Windows.Forms.DateTimePicker dateTimePicker1;
private System.Windows.Forms.TextBox textEmployeeID;
private System.Windows.Forms.DateTimePicker dateTimePicker4;
private System.Windows.Forms.DateTimePicker dateTimePicker3;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Label label19;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.GroupBox groupBox4;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox textLateCount;
private System.Windows.Forms.TextBox textSickLeaveMoney;
private System.Windows.Forms.TextBox textLeaveEarlyMoney;
private System.Windows.Forms.TextBox textAffairLeaveCount;
private System.Windows.Forms.TextBox textSickLeaveCount;
private System.Windows.Forms.TextBox textLeaveEarlyCount;
private System.Windows.Forms.TextBox textAffairLeaveMoney;
private System.Windows.Forms.TextBox textTotalWage;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private OleDbConnection Connection1=null;
private OleDbCommand Command1=null;
private OleDbDataReader DataReader1=null;
private OleDbDataAdapter dataAdapter1=null;
private OleDbDataAdapter dataAdapter2=null;
private string connectionStr;
private string commandStr;
private string selectStr1;
private string selectStr2;
private DataSet DataSetWage=new DataSet();
private DataSet DataSetViewWage=new DataSet();
DataView DataViewWage=new DataView();
private System.Windows.Forms.TextBox textRewardMoeny;
private System.Windows.Forms.Button btnCaculate;
private System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.TextBox textLateMoney;
private System.Windows.Forms.TextBox textEmployeeID2;
private System.Windows.Forms.Button btnWageSearch;
private System.Windows.Forms.Button btnWageExport;
private string [] ReportHeader={"职工号","姓名","部门","职务","基本工资","奖金","迟到罚款","早退罚款","病假罚款","事假罚款","奖惩总数","总工资","开始日期","截至日期","发放日期"};
private System.Windows.Forms.Button btnPeopleWageExport;
private System.Windows.Forms.Label lblTotalWage;
private System.Windows.Forms.TextBox textBasicWage;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox textAbsence;
private System.Windows.Forms.TextBox textAbsenceMoney;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label21;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Wage()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.connectionStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +Application.StartupPath + "\\ManPowerManage.mdb";
this.selectStr2="select * from View_Wage";
this.selectStr1="select * from Wage";
this.Connection1=new OleDbConnection(this.connectionStr);
this.Command1=new OleDbCommand();
this.dataAdapter1=new OleDbDataAdapter(this.selectStr1,this.Connection1);
this.dataAdapter2=new OleDbDataAdapter(this.selectStr2,this.Connection1);
this.Command1.Connection=this.Connection1;
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Wage));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.btnCaculate = new System.Windows.Forms.Button();
this.textTotalWage = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.groupBox4 = new System.Windows.Forms.GroupBox();
this.textRewardMoeny = new System.Windows.Forms.TextBox();
this.label20 = new System.Windows.Forms.Label();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.textLateCount = new System.Windows.Forms.TextBox();
this.textAffairLeaveMoney = new System.Windows.Forms.TextBox();
this.textLeaveEarlyCount = new System.Windows.Forms.TextBox();
this.textSickLeaveCount = new System.Windows.Forms.TextBox();
this.textAffairLeaveCount = new System.Windows.Forms.TextBox();
this.textLateMoney = new System.Windows.Forms.TextBox();
this.textLeaveEarlyMoney = new System.Windows.Forms.TextBox();
this.textSickLeaveMoney = new System.Windows.Forms.TextBox();
this.label19 = new System.Windows.Forms.Label();
this.label18 = new System.Windows.Forms.Label();
this.label17 = new System.Windows.Forms.Label();
this.label16 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.btnPeopleWageExport = new System.Windows.Forms.Button();
this.btnApply = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
this.label11 = new System.Windows.Forms.Label();
this.textEmployeeID = new System.Windows.Forms.TextBox();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.dateTimePicker4 = new System.Windows.Forms.DateTimePicker();
this.dateTimePicker3 = new System.Windows.Forms.DateTimePicker();
this.label14 = new System.Windows.Forms.Label();
this.textEmployeeID2 = new System.Windows.Forms.TextBox();
this.btnSearchCancel = new System.Windows.Forms.Button();
this.btnWageSearch = new System.Windows.Forms.Button();
this.btnWageExport = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.lblTotalWage = new System.Windows.Forms.Label();
this.textBasicWage = new System.Windows.Forms.TextBox();
this.label24 = new System.Windows.Forms.Label();
this.textAbsence = new System.Windows.Forms.TextBox();
this.textAbsenceMoney = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label21 = new System.Windows.Forms.Label();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
this.tabPage2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(8, 8);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(688, 432);
this.tabControl1.TabIndex = 0;
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
//
// tabPage1
//
this.tabPage1.Controls.Add(this.label24);
this.tabPage1.Controls.Add(this.textBasicWage);
this.tabPage1.Controls.Add(this.lblTotalWage);
this.tabPage1.Controls.Add(this.btnCaculate);
this.tabPage1.Controls.Add(this.textTotalWage);
this.tabPage1.Controls.Add(this.label22);
this.tabPage1.Controls.Add(this.groupBox4);
this.tabPage1.Controls.Add(this.groupBox3);
this.tabPage1.Controls.Add(this.btnPeopleWageExport);
this.tabPage1.Controls.Add(this.btnApply);
this.tabPage1.Controls.Add(this.btnCancel);
this.tabPage1.Controls.Add(this.groupBox1);
this.tabPage1.Controls.Add(this.label12);
this.tabPage1.ForeColor = System.Drawing.SystemColors.Desktop;
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(680, 407);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "工资发放";
//
// btnCaculate
//
this.btnCaculate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCaculate.Image = ((System.Drawing.Image)(resources.GetObject("btnCaculate.Image")));
this.btnCaculate.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnCaculate.Location = new System.Drawing.Point(408, 32);
this.btnCaculate.Name = "btnCaculate";
this.btnCaculate.Size = new System.Drawing.Size(56, 24);
this.btnCaculate.TabIndex = 124;
this.btnCaculate.Text = "计算";
this.btnCaculate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnCaculate.Click += new System.EventHandler(this.btnCaculate_Click);
//
// textTotalWage
//
this.textTotalWage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textTotalWage.Enabled = false;
this.textTotalWage.Location = new System.Drawing.Point(424, 336);
this.textTotalWage.Name = "textTotalWage";
this.textTotalWage.Size = new System.Drawing.Size(72, 21);
this.textTotalWage.TabIndex = 122;
this.textTotalWage.Text = "";
//
// label22
//
this.label22.Location = new System.Drawing.Point(352, 344);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(72, 16);
this.label22.TabIndex = 121;
this.label22.Text = "工资总计¥";
//
// groupBox4
//
this.groupBox4.Controls.Add(this.textRewardMoeny);
this.groupBox4.Controls.Add(this.label20);
this.groupBox4.Location = new System.Drawing.Point(336, 208);
this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(176, 80);
this.groupBox4.TabIndex = 120;
this.groupBox4.TabStop = false;
this.groupBox4.Text = "奖励惩罚";
//
// textRewardMoeny
//
this.textRewardMoeny.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textRewardMoeny.Enabled = false;
this.textRewardMoeny.Location = new System.Drawing.Point(80, 32);
this.textRewardMoeny.Name = "textRewardMoeny";
this.textRewardMoeny.Size = new System.Drawing.Size(56, 21);
this.textRewardMoeny.TabIndex = 118;
this.textRewardMoeny.Text = "";
//
// label20
//
this.label20.Location = new System.Drawing.Point(8, 32);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(72, 23);
this.label20.TabIndex = 54;
this.label20.Text = "奖惩总计¥";
//
// groupBox3
//
this.groupBox3.Controls.Add(this.textAbsence);
this.groupBox3.Controls.Add(this.textAbsenceMoney);
this.groupBox3.Controls.Add(this.label3);
this.groupBox3.Controls.Add(this.label21);
this.groupBox3.Controls.Add(this.textLateCount);
this.groupBox3.Controls.Add(this.textAffairLeaveMoney);
this.groupBox3.Controls.Add(this.textLeaveEarlyCount);
this.groupBox3.Controls.Add(this.textSickLeaveCount);
this.groupBox3.Controls.Add(this.textAffairLeaveCount);
this.groupBox3.Controls.Add(this.textLateMoney);
this.groupBox3.Controls.Add(this.textLeaveEarlyMoney);
this.groupBox3.Controls.Add(this.textSickLeaveMoney);
this.groupBox3.Controls.Add(this.label19);
this.groupBox3.Controls.Add(this.label18);
this.groupBox3.Controls.Add(this.label17);
this.groupBox3.Controls.Add(this.label16);
this.groupBox3.Controls.Add(this.label15);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.label5);
this.groupBox3.Controls.Add(this.label4);
this.groupBox3.ForeColor = System.Drawing.SystemColors.Desktop;
this.groupBox3.Location = new System.Drawing.Point(16, 128);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(296, 208);
this.groupBox3.TabIndex = 116;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "考勤罚款";
//
// textLateCount
//
this.textLateCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textLateCount.Enabled = false;
this.textLateCount.Location = new System.Drawing.Point(88, 32);
this.textLateCount.Name = "textLateCount";
this.textLateCount.Size = new System.Drawing.Size(32, 21);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -