SalaryManage.cs
资源名称:VCSDB.rar [点击查看]
上传用户:hjieqiu
上传日期:2013-05-11
资源大小:16494k
文件大小:82k
源码类别:
企业管理
开发平台:
C#
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- using System.Data.SqlClient;
- namespace 人力资源管理系统
- {
- /// <summary>
- /// WageManage 的摘要说明。
- /// </summary>
- public class SalaryManage : System.Windows.Forms.Form
- {
- private DataTable datagridTempTable = new DataTable(); //为DataGrid提供数据的表单
- private DataTable tempTable = new DataTable(); //为TextBox修改数据提供数据的表单
- private CurrencyManager cmSalary;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.TextBox txt12;
- private System.Windows.Forms.TextBox txt6;
- private System.Windows.Forms.TextBox txt11;
- private System.Windows.Forms.TextBox txt15;
- private System.Windows.Forms.TextBox txt13;
- private System.Windows.Forms.TextBox txt16;
- private System.Windows.Forms.TextBox txt5;
- private System.Windows.Forms.TextBox txt10;
- private System.Windows.Forms.TextBox txt14;
- private System.Windows.Forms.TextBox txt1;
- private System.Windows.Forms.TextBox txt2;
- private System.Windows.Forms.TextBox txt9;
- private System.Windows.Forms.TextBox txt8;
- private System.Windows.Forms.TextBox txt4;
- private System.Windows.Forms.TextBox txt3;
- private System.Windows.Forms.TextBox txt7;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Label label4;
- private System.Windows.Forms.Label label5;
- private System.Windows.Forms.Label label6;
- private System.Windows.Forms.Label label7;
- private System.Windows.Forms.Label label8;
- private System.Windows.Forms.Label label9;
- private System.Windows.Forms.Label label10;
- private System.Windows.Forms.Label label11;
- private System.Windows.Forms.Label label12;
- private System.Windows.Forms.Label label13;
- private System.Windows.Forms.Label label14;
- 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 label21;
- private System.Windows.Forms.Label label20;
- private System.Windows.Forms.Label label22;
- private System.Windows.Forms.Label label23;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.DataGrid dataGrid1;
- private System.Windows.Forms.TextBox txt17;
- private System.Windows.Forms.TextBox txt18;
- private System.Windows.Forms.TextBox txt19;
- private System.Windows.Forms.TextBox txt21;
- private System.Windows.Forms.TextBox txt20;
- private System.Windows.Forms.TextBox txt22;
- private System.Windows.Forms.TextBox txt23;
- private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
- private System.Data.SqlClient.SqlConnection sqlConnection1;
- private System.Windows.Forms.Button btnGetSalary;
- private System.Windows.Forms.Button btnCalSalary;
- private System.Windows.Forms.Button btnGiveSalary;
- private System.Windows.Forms.ImageList imageList1;
- private System.Windows.Forms.ToolBar toolBar1;
- private System.Windows.Forms.ToolBarButton toolBarFirst;
- private System.Windows.Forms.ToolBarButton toolBarPre;
- private System.Windows.Forms.ToolBarButton toolBarNext;
- private System.Windows.Forms.ToolBarButton toolBarLast;
- private System.Windows.Forms.ToolBarButton toolBarSubmit;
- private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter2;
- private System.Windows.Forms.ToolBarButton tbarBtnCancell;
- private System.Windows.Forms.ToolBarButton toolBarQuit;
- private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
- private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
- private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
- private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
- private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
- private System.ComponentModel.IContainer components;
- public SalaryManage()
- {
- //
- // 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.components = new System.ComponentModel.Container();
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(SalaryManage));
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.txt12 = new System.Windows.Forms.TextBox();
- this.txt6 = new System.Windows.Forms.TextBox();
- this.txt11 = new System.Windows.Forms.TextBox();
- this.txt15 = new System.Windows.Forms.TextBox();
- this.txt13 = new System.Windows.Forms.TextBox();
- this.txt16 = new System.Windows.Forms.TextBox();
- this.txt5 = new System.Windows.Forms.TextBox();
- this.txt10 = new System.Windows.Forms.TextBox();
- this.txt14 = new System.Windows.Forms.TextBox();
- this.txt1 = new System.Windows.Forms.TextBox();
- this.txt2 = new System.Windows.Forms.TextBox();
- this.txt9 = new System.Windows.Forms.TextBox();
- this.txt8 = new System.Windows.Forms.TextBox();
- this.txt4 = new System.Windows.Forms.TextBox();
- this.txt3 = new System.Windows.Forms.TextBox();
- this.txt7 = new System.Windows.Forms.TextBox();
- this.label3 = new System.Windows.Forms.Label();
- this.label4 = new System.Windows.Forms.Label();
- this.label5 = new System.Windows.Forms.Label();
- this.label6 = new System.Windows.Forms.Label();
- this.label7 = new System.Windows.Forms.Label();
- this.label8 = new System.Windows.Forms.Label();
- this.label9 = new System.Windows.Forms.Label();
- this.label10 = new System.Windows.Forms.Label();
- this.label11 = new System.Windows.Forms.Label();
- this.label12 = new System.Windows.Forms.Label();
- this.label13 = new System.Windows.Forms.Label();
- this.label14 = new System.Windows.Forms.Label();
- this.label15 = new System.Windows.Forms.Label();
- this.label16 = new System.Windows.Forms.Label();
- this.label17 = new System.Windows.Forms.Label();
- this.label18 = new System.Windows.Forms.Label();
- this.label19 = new System.Windows.Forms.Label();
- this.txt17 = new System.Windows.Forms.TextBox();
- this.txt18 = new System.Windows.Forms.TextBox();
- this.txt19 = new System.Windows.Forms.TextBox();
- this.txt21 = new System.Windows.Forms.TextBox();
- this.txt20 = new System.Windows.Forms.TextBox();
- this.label20 = new System.Windows.Forms.Label();
- this.label22 = new System.Windows.Forms.Label();
- this.label23 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.label21 = new System.Windows.Forms.Label();
- this.txt22 = new System.Windows.Forms.TextBox();
- this.txt23 = new System.Windows.Forms.TextBox();
- this.btnGetSalary = new System.Windows.Forms.Button();
- this.btnCalSalary = new System.Windows.Forms.Button();
- this.btnGiveSalary = new System.Windows.Forms.Button();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.dataGrid1 = new System.Windows.Forms.DataGrid();
- this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
- this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
- this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
- this.imageList1 = new System.Windows.Forms.ImageList(this.components);
- this.toolBar1 = new System.Windows.Forms.ToolBar();
- this.toolBarFirst = new System.Windows.Forms.ToolBarButton();
- this.toolBarPre = new System.Windows.Forms.ToolBarButton();
- this.toolBarNext = new System.Windows.Forms.ToolBarButton();
- this.toolBarLast = new System.Windows.Forms.ToolBarButton();
- this.toolBarSubmit = new System.Windows.Forms.ToolBarButton();
- this.tbarBtnCancell = new System.Windows.Forms.ToolBarButton();
- this.toolBarQuit = new System.Windows.Forms.ToolBarButton();
- this.sqlDataAdapter2 = new System.Data.SqlClient.SqlDataAdapter();
- this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
- this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
- this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
- this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
- this.SuspendLayout();
- //
- // groupBox1
- //
- this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox1.Controls.Add(this.label1);
- this.groupBox1.Controls.Add(this.txt12);
- this.groupBox1.Controls.Add(this.txt6);
- this.groupBox1.Controls.Add(this.txt11);
- this.groupBox1.Controls.Add(this.txt15);
- this.groupBox1.Controls.Add(this.txt13);
- this.groupBox1.Controls.Add(this.txt16);
- this.groupBox1.Controls.Add(this.txt5);
- this.groupBox1.Controls.Add(this.txt10);
- this.groupBox1.Controls.Add(this.txt14);
- this.groupBox1.Controls.Add(this.txt1);
- this.groupBox1.Controls.Add(this.txt2);
- this.groupBox1.Controls.Add(this.txt9);
- this.groupBox1.Controls.Add(this.txt8);
- this.groupBox1.Controls.Add(this.txt4);
- this.groupBox1.Controls.Add(this.txt3);
- this.groupBox1.Controls.Add(this.txt7);
- this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.label4);
- this.groupBox1.Controls.Add(this.label5);
- this.groupBox1.Controls.Add(this.label6);
- this.groupBox1.Controls.Add(this.label7);
- this.groupBox1.Controls.Add(this.label8);
- this.groupBox1.Controls.Add(this.label9);
- this.groupBox1.Controls.Add(this.label10);
- this.groupBox1.Controls.Add(this.label11);
- this.groupBox1.Controls.Add(this.label12);
- this.groupBox1.Controls.Add(this.label13);
- this.groupBox1.Controls.Add(this.label14);
- this.groupBox1.Controls.Add(this.label15);
- this.groupBox1.Controls.Add(this.label16);
- this.groupBox1.Controls.Add(this.label17);
- this.groupBox1.Controls.Add(this.label18);
- this.groupBox1.Controls.Add(this.label19);
- this.groupBox1.Controls.Add(this.txt17);
- this.groupBox1.Controls.Add(this.txt18);
- this.groupBox1.Controls.Add(this.txt19);
- this.groupBox1.Controls.Add(this.txt21);
- this.groupBox1.Controls.Add(this.txt20);
- this.groupBox1.Controls.Add(this.label20);
- this.groupBox1.Controls.Add(this.label22);
- this.groupBox1.Controls.Add(this.label23);
- this.groupBox1.Location = new System.Drawing.Point(0, 253);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(640, 192);
- this.groupBox1.TabIndex = 3;
- this.groupBox1.TabStop = false;
- //
- // label1
- //
- this.label1.Location = new System.Drawing.Point(560, 136);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(64, 16);
- this.label1.TabIndex = 19;
- this.label1.Text = "工伤保险";
- //
- // txt12
- //
- this.txt12.Location = new System.Drawing.Point(380, 96);
- this.txt12.Name = "txt12";
- this.txt12.Size = new System.Drawing.Size(64, 21);
- this.txt12.TabIndex = 11;
- this.txt12.Text = "";
- //
- // txt6
- //
- this.txt6.Location = new System.Drawing.Point(472, 40);
- this.txt6.Name = "txt6";
- this.txt6.Size = new System.Drawing.Size(64, 21);
- this.txt6.TabIndex = 5;
- this.txt6.Text = "";
- //
- // txt11
- //
- this.txt11.Location = new System.Drawing.Point(288, 96);
- this.txt11.Name = "txt11";
- this.txt11.Size = new System.Drawing.Size(64, 21);
- this.txt11.TabIndex = 10;
- this.txt11.Text = "";
- //
- // txt15
- //
- this.txt15.Location = new System.Drawing.Point(12, 160);
- this.txt15.Name = "txt15";
- this.txt15.Size = new System.Drawing.Size(64, 21);
- this.txt15.TabIndex = 14;
- this.txt15.Text = "";
- //
- // txt13
- //
- this.txt13.Location = new System.Drawing.Point(472, 96);
- this.txt13.Name = "txt13";
- this.txt13.Size = new System.Drawing.Size(64, 21);
- this.txt13.TabIndex = 12;
- this.txt13.Text = "";
- //
- // txt16
- //
- this.txt16.Location = new System.Drawing.Point(104, 160);
- this.txt16.Name = "txt16";
- this.txt16.Size = new System.Drawing.Size(64, 21);
- this.txt16.TabIndex = 15;
- this.txt16.Text = "";
- //
- // txt5
- //
- this.txt5.Location = new System.Drawing.Point(380, 40);
- this.txt5.Name = "txt5";
- this.txt5.Size = new System.Drawing.Size(64, 21);
- this.txt5.TabIndex = 4;
- this.txt5.Text = "";
- //
- // txt10
- //
- this.txt10.Location = new System.Drawing.Point(196, 96);
- this.txt10.Name = "txt10";
- this.txt10.Size = new System.Drawing.Size(64, 21);
- this.txt10.TabIndex = 9;
- this.txt10.Text = "";
- //
- // txt14
- //
- this.txt14.Location = new System.Drawing.Point(564, 96);
- this.txt14.Name = "txt14";
- this.txt14.Size = new System.Drawing.Size(64, 21);
- this.txt14.TabIndex = 13;
- this.txt14.Text = "";
- //
- // txt1
- //
- this.txt1.Location = new System.Drawing.Point(12, 40);
- this.txt1.Name = "txt1";
- this.txt1.Size = new System.Drawing.Size(64, 21);
- this.txt1.TabIndex = 0;
- this.txt1.Text = "";
- //
- // txt2
- //
- this.txt2.Location = new System.Drawing.Point(104, 40);
- this.txt2.Name = "txt2";
- this.txt2.Size = new System.Drawing.Size(64, 21);
- this.txt2.TabIndex = 1;
- this.txt2.Text = "";
- //
- // txt9
- //
- this.txt9.Location = new System.Drawing.Point(104, 96);
- this.txt9.Name = "txt9";
- this.txt9.Size = new System.Drawing.Size(64, 21);
- this.txt9.TabIndex = 8;
- this.txt9.Text = "";
- //
- // txt8
- //
- this.txt8.Location = new System.Drawing.Point(12, 96);
- this.txt8.Name = "txt8";
- this.txt8.Size = new System.Drawing.Size(64, 21);
- this.txt8.TabIndex = 7;
- this.txt8.Text = "";
- //
- // txt4
- //
- this.txt4.Location = new System.Drawing.Point(288, 40);
- this.txt4.Name = "txt4";
- this.txt4.Size = new System.Drawing.Size(64, 21);
- this.txt4.TabIndex = 3;
- this.txt4.Text = "";
- //
- // txt3
- //
- this.txt3.Location = new System.Drawing.Point(200, 40);
- this.txt3.Name = "txt3";
- this.txt3.Size = new System.Drawing.Size(64, 21);
- this.txt3.TabIndex = 2;
- this.txt3.Text = "";
- //
- // txt7
- //
- this.txt7.Location = new System.Drawing.Point(564, 40);
- this.txt7.Name = "txt7";
- this.txt7.Size = new System.Drawing.Size(64, 21);
- this.txt7.TabIndex = 6;
- this.txt7.Text = "";
- //
- // label3
- //
- this.label3.Location = new System.Drawing.Point(12, 76);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(68, 16);
- this.label3.TabIndex = 19;
- this.label3.Text = "工龄工资";
- //
- // label4
- //
- this.label4.Location = new System.Drawing.Point(104, 76);
- this.label4.Name = "label4";
- this.label4.Size = new System.Drawing.Size(64, 16);
- this.label4.TabIndex = 19;
- this.label4.Text = "考核工资";
- //
- // label5
- //
- this.label5.Location = new System.Drawing.Point(288, 76);
- this.label5.Name = "label5";
- this.label5.Size = new System.Drawing.Size(64, 16);
- this.label5.TabIndex = 19;
- this.label5.Text = "房租";
- //
- // label6
- //
- this.label6.Location = new System.Drawing.Point(12, 16);
- this.label6.Name = "label6";
- this.label6.Size = new System.Drawing.Size(60, 16);
- this.label6.TabIndex = 19;
- this.label6.Text = "基本工资";
- //
- // label7
- //
- this.label7.Location = new System.Drawing.Point(380, 76);
- this.label7.Name = "label7";
- this.label7.Size = new System.Drawing.Size(64, 16);
- this.label7.TabIndex = 19;
- this.label7.Text = "水电费";
- //
- // label8
- //
- this.label8.Location = new System.Drawing.Point(560, 16);
- this.label8.Name = "label8";
- this.label8.Size = new System.Drawing.Size(64, 16);
- this.label8.TabIndex = 19;
- this.label8.Text = "职务工资";
- //
- // label9
- //
- this.label9.Location = new System.Drawing.Point(464, 76);
- this.label9.Name = "label9";
- this.label9.Size = new System.Drawing.Size(64, 16);
- this.label9.TabIndex = 19;
- this.label9.Text = "请假扣除";
- //
- // label10
- //
- this.label10.Location = new System.Drawing.Point(380, 16);
- this.label10.Name = "label10";
- this.label10.Size = new System.Drawing.Size(64, 16);
- this.label10.TabIndex = 19;
- this.label10.Text = "房补";
- //
- // label11
- //
- this.label11.Location = new System.Drawing.Point(196, 76);
- this.label11.Name = "label11";
- this.label11.Size = new System.Drawing.Size(64, 16);
- this.label11.TabIndex = 19;
- this.label11.Text = "奖金";
- //
- // label12
- //
- this.label12.Location = new System.Drawing.Point(104, 136);
- this.label12.Name = "label12";
- this.label12.Size = new System.Drawing.Size(72, 16);
- this.label12.TabIndex = 19;
- this.label12.Text = "住房公积金";
- //
- // label13
- //
- this.label13.Location = new System.Drawing.Point(560, 76);
- this.label13.Name = "label13";
- this.label13.Size = new System.Drawing.Size(72, 16);
- this.label13.TabIndex = 19;
- this.label13.Text = "考勤扣除";
- //
- // label14
- //
- this.label14.Location = new System.Drawing.Point(288, 16);
- this.label14.Name = "label14";
- this.label14.Size = new System.Drawing.Size(48, 16);
- this.label14.TabIndex = 19;
- this.label14.Text = "粮副补";
- //
- // label15
- //
- this.label15.Location = new System.Drawing.Point(464, 16);
- this.label15.Name = "label15";
- this.label15.Size = new System.Drawing.Size(48, 16);
- this.label15.TabIndex = 19;
- this.label15.Text = "临时补";
- //
- // label16
- //
- this.label16.Location = new System.Drawing.Point(196, 16);
- this.label16.Name = "label16";
- this.label16.Size = new System.Drawing.Size(48, 16);
- this.label16.TabIndex = 19;
- this.label16.Text = "合同补";
- //
- // label17
- //
- this.label17.Location = new System.Drawing.Point(12, 136);
- this.label17.Name = "label17";
- this.label17.Size = new System.Drawing.Size(60, 16);
- this.label17.TabIndex = 19;
- this.label17.Text = "罚款";
- //
- // label18
- //
- this.label18.Location = new System.Drawing.Point(104, 16);
- this.label18.Name = "label18";
- this.label18.Size = new System.Drawing.Size(56, 16);
- this.label18.TabIndex = 19;
- this.label18.Text = "浮动工资";
- //
- // label19
- //
- this.label19.Location = new System.Drawing.Point(196, 136);
- this.label19.Name = "label19";
- this.label19.Size = new System.Drawing.Size(64, 16);
- this.label19.TabIndex = 19;
- this.label19.Text = "医疗保险";
- //
- // txt17
- //
- this.txt17.Location = new System.Drawing.Point(196, 160);
- this.txt17.Name = "txt17";
- this.txt17.Size = new System.Drawing.Size(64, 21);
- this.txt17.TabIndex = 16;
- this.txt17.Text = "";
- //
- // txt18
- //
- this.txt18.Location = new System.Drawing.Point(288, 160);
- this.txt18.Name = "txt18";
- this.txt18.Size = new System.Drawing.Size(64, 21);
- this.txt18.TabIndex = 17;
- this.txt18.Text = "";
- //
- // txt19
- //
- this.txt19.Location = new System.Drawing.Point(380, 160);
- this.txt19.Name = "txt19";
- this.txt19.Size = new System.Drawing.Size(64, 21);
- this.txt19.TabIndex = 18;
- this.txt19.Text = "";
- //
- // txt21
- //
- this.txt21.Location = new System.Drawing.Point(564, 160);
- this.txt21.Name = "txt21";
- this.txt21.Size = new System.Drawing.Size(64, 21);
- this.txt21.TabIndex = 20;
- this.txt21.Text = "";
- //
- // txt20
- //
- this.txt20.Location = new System.Drawing.Point(472, 160);
- this.txt20.Name = "txt20";
- this.txt20.Size = new System.Drawing.Size(64, 21);
- this.txt20.TabIndex = 19;
- this.txt20.Text = "";
- //
- // label20
- //
- this.label20.Location = new System.Drawing.Point(288, 136);
- this.label20.Name = "label20";
- this.label20.Size = new System.Drawing.Size(64, 16);
- this.label20.TabIndex = 19;
- this.label20.Text = "养老保险";
- //
- // label22
- //
- this.label22.Location = new System.Drawing.Point(380, 136);
- this.label22.Name = "label22";
- this.label22.Size = new System.Drawing.Size(64, 16);
- this.label22.TabIndex = 19;
- this.label22.Text = "失业保险";
- //
- // label23
- //
- this.label23.Location = new System.Drawing.Point(464, 136);
- this.label23.Name = "label23";
- this.label23.Size = new System.Drawing.Size(64, 16);
- this.label23.TabIndex = 19;
- this.label23.Text = "生育保险";
- //
- // label2
- //
- this.label2.Location = new System.Drawing.Point(31, 20);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(56, 16);
- this.label2.TabIndex = 19;
- this.label2.Text = "当前月份";
- //
- // label21
- //
- this.label21.Location = new System.Drawing.Point(159, 20);
- this.label21.Name = "label21";
- this.label21.Size = new System.Drawing.Size(56, 16);
- this.label21.TabIndex = 19;
- this.label21.Text = "倒入月份";
- //
- // txt22
- //
- this.txt22.Location = new System.Drawing.Point(87, 15);
- this.txt22.Name = "txt22";
- this.txt22.Size = new System.Drawing.Size(64, 21);
- this.txt22.TabIndex = 21;
- this.txt22.Text = "";
- //
- // txt23
- //
- this.txt23.Location = new System.Drawing.Point(221, 15);
- this.txt23.Name = "txt23";
- this.txt23.Size = new System.Drawing.Size(64, 21);
- this.txt23.TabIndex = 22;
- this.txt23.Text = "";
- //
- // btnGetSalary
- //
- this.btnGetSalary.Location = new System.Drawing.Point(306, 15);
- this.btnGetSalary.Name = "btnGetSalary";
- this.btnGetSalary.Size = new System.Drawing.Size(93, 23);
- this.btnGetSalary.TabIndex = 23;
- this.btnGetSalary.Text = "倒入工资历史";
- this.btnGetSalary.Click += new System.EventHandler(this.btnGetSalary_Click);
- //
- // btnCalSalary
- //
- this.btnCalSalary.Location = new System.Drawing.Point(420, 15);
- this.btnCalSalary.Name = "btnCalSalary";
- this.btnCalSalary.Size = new System.Drawing.Size(93, 23);
- this.btnCalSalary.TabIndex = 24;
- this.btnCalSalary.Text = "计算当月工资";
- this.btnCalSalary.Click += new System.EventHandler(this.btnCalSalary_Click);
- //
- // btnGiveSalary
- //
- this.btnGiveSalary.Location = new System.Drawing.Point(534, 15);
- this.btnGiveSalary.Name = "btnGiveSalary";
- this.btnGiveSalary.TabIndex = 25;
- this.btnGiveSalary.Text = "工资发放";
- this.btnGiveSalary.Click += new System.EventHandler(this.btnGiveSalary_Click);
- //
- // groupBox2
- //
- this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.groupBox2.Controls.Add(this.label21);
- this.groupBox2.Controls.Add(this.txt22);
- this.groupBox2.Controls.Add(this.btnCalSalary);
- this.groupBox2.Controls.Add(this.btnGetSalary);
- this.groupBox2.Controls.Add(this.btnGiveSalary);
- this.groupBox2.Controls.Add(this.txt23);
- this.groupBox2.Controls.Add(this.label2);
- this.groupBox2.Location = new System.Drawing.Point(0, 41);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(640, 48);
- this.groupBox2.TabIndex = 21;
- this.groupBox2.TabStop = false;
- //
- // dataGrid1
- //
- this.dataGrid1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.dataGrid1.CaptionVisible = false;
- this.dataGrid1.DataMember = "";
- this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
- this.dataGrid1.Location = new System.Drawing.Point(0, 96);
- this.dataGrid1.Name = "dataGrid1";
- this.dataGrid1.Size = new System.Drawing.Size(640, 160);
- this.dataGrid1.TabIndex = 26;
- this.dataGrid1.CurrentCellChanged += new System.EventHandler(this.dataGrid1_CurrentCellChanged);
- //
- // sqlDataAdapter1
- //
- this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
- this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
- new System.Data.Common.DataTableMapping("Table", "职员基本信息表", new System.Data.Common.DataColumnMapping[] {
- new System.Data.Common.DataColumnMapping("姓名", "姓名"),
- new System.Data.Common.DataColumnMapping("日期", "日期"),
- new System.Data.Common.DataColumnMapping("应发金额合计", "应发金额合计"),
- new System.Data.Common.DataColumnMapping("应扣金额合计", "应扣金额合计"),
- new System.Data.Common.DataColumnMapping("工资合计", "工资合计"),
- new System.Data.Common.DataColumnMapping("个人所得税", "个人所得税"),
- new System.Data.Common.DataColumnMapping("实发金额", "实发金额"),
- new System.Data.Common.DataColumnMapping("发放否", "发放否"),
- new System.Data.Common.DataColumnMapping("职员编号", "职员编号"),
- new System.Data.Common.DataColumnMapping("Expr1", "Expr1")})});
- //
- // sqlSelectCommand1
- //
- this.sqlSelectCommand1.CommandText = "SELECT a.姓名, b.日期, b.应发金额合计, b.应扣金额合计, b.工资合计, b.个人所得税, b.实发金额, b.发放否, a.职员编号, b." +
- "职员编号 AS Expr1 FROM 职员基本信息表 a INNER JOIN 月工资统计表 b ON a.职员编号 = b.职员编号";
- this.sqlSelectCommand1.Connection = this.sqlConnection1;
- //
- // sqlConnection1
- //
- this.sqlConnection1.ConnectionString = "workstation id=localhost;Integrated Security=SSPI;Database=hrmbook;";
- //
- // imageList1
- //
- this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
- this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
- this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
- //
- // toolBar1
- //
- this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
- this.toolBarFirst,
- this.toolBarPre,
- this.toolBarNext,
- this.toolBarLast,
- this.toolBarSubmit,
- this.tbarBtnCancell,
- this.toolBarQuit});
- this.toolBar1.DropDownArrows = true;
- this.toolBar1.ImageList = this.imageList1;
- this.toolBar1.Location = new System.Drawing.Point(0, 0);
- this.toolBar1.Name = "toolBar1";
- this.toolBar1.ShowToolTips = true;
- this.toolBar1.Size = new System.Drawing.Size(640, 41);
- this.toolBar1.TabIndex = 25;
- this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
- //
- // toolBarFirst
- //
- this.toolBarFirst.ImageIndex = 0;
- this.toolBarFirst.Text = "首记录";
- this.toolBarFirst.ToolTipText = "首记录";
- //
- // toolBarPre
- //
- this.toolBarPre.ImageIndex = 1;
- this.toolBarPre.Text = "上一记录";
- this.toolBarPre.ToolTipText = "上一记录";
- //
- // toolBarNext
- //
- this.toolBarNext.ImageIndex = 2;
- this.toolBarNext.Text = "下一记录";
- this.toolBarNext.ToolTipText = "下一记录";
- //
- // toolBarLast
- //
- this.toolBarLast.ImageIndex = 3;
- this.toolBarLast.Text = "尾记录";
- this.toolBarLast.ToolTipText = "尾记录";
- //
- // toolBarSubmit
- //
- this.toolBarSubmit.ImageIndex = 4;
- this.toolBarSubmit.Text = "提交修改";
- this.toolBarSubmit.ToolTipText = "提交修改";
- //
- // tbarBtnCancell
- //
- this.tbarBtnCancell.ImageIndex = 5;
- this.tbarBtnCancell.Text = "取消修改";
- this.tbarBtnCancell.ToolTipText = "取消修改";
- //
- // toolBarQuit
- //
- this.toolBarQuit.ImageIndex = 6;
- this.toolBarQuit.Text = "退出";
- this.toolBarQuit.ToolTipText = "退出";
- //
- // sqlDataAdapter2
- //
- this.sqlDataAdapter2.DeleteCommand = this.sqlDeleteCommand1;
- this.sqlDataAdapter2.InsertCommand = this.sqlInsertCommand1;
- this.sqlDataAdapter2.SelectCommand = this.sqlSelectCommand2;
- this.sqlDataAdapter2.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
- new System.Data.Common.DataTableMapping("Table", "月工资统计表", new System.Data.Common.DataColumnMapping[] {
- new System.Data.Common.DataColumnMapping("日期", "日期"),
- new System.Data.Common.DataColumnMapping("职员编号", "职员编号"),
- new System.Data.Common.DataColumnMapping("基本工资", "基本工资"),
- new System.Data.Common.DataColumnMapping("浮动工资", "浮动工资"),
- new System.Data.Common.DataColumnMapping("合同补", "合同补"),
- new System.Data.Common.DataColumnMapping("粮副补", "粮副补"),
- new System.Data.Common.DataColumnMapping("房补", "房补"),
- new System.Data.Common.DataColumnMapping("临时补", "临时补"),
- new System.Data.Common.DataColumnMapping("职务工资", "职务工资"),
- new System.Data.Common.DataColumnMapping("工龄工资", "工龄工资"),
- new System.Data.Common.DataColumnMapping("考核工资", "考核工资"),
- new System.Data.Common.DataColumnMapping("奖金", "奖金"),
- new System.Data.Common.DataColumnMapping("应发金额合计", "应发金额合计"),
- new System.Data.Common.DataColumnMapping("房租", "房租"),
- new System.Data.Common.DataColumnMapping("水电费", "水电费"),
- new System.Data.Common.DataColumnMapping("请假扣除", "请假扣除"),
- new System.Data.Common.DataColumnMapping("考勤扣除", "考勤扣除"),
- new System.Data.Common.DataColumnMapping("罚款", "罚款"),
- new System.Data.Common.DataColumnMapping("住房公积金", "住房公积金"),
- new System.Data.Common.DataColumnMapping("医疗保险", "医疗保险"),
- new System.Data.Common.DataColumnMapping("养老保险", "养老保险"),
- new System.Data.Common.DataColumnMapping("失业保险", "失业保险"),
- new System.Data.Common.DataColumnMapping("生育保险", "生育保险"),
- new System.Data.Common.DataColumnMapping("工伤保险", "工伤保险"),
- new System.Data.Common.DataColumnMapping("应扣金额合计", "应扣金额合计"),
- new System.Data.Common.DataColumnMapping("工资合计", "工资合计"),
- new System.Data.Common.DataColumnMapping("个人所得税", "个人所得税"),
- new System.Data.Common.DataColumnMapping("实发金额", "实发金额"),
- new System.Data.Common.DataColumnMapping("发放否", "发放否"),
- new System.Data.Common.DataColumnMapping("月份", "月份")})});
- this.sqlDataAdapter2.UpdateCommand = this.sqlUpdateCommand1;
- //
- // sqlDeleteCommand1
- //
- this.sqlDeleteCommand1.CommandText = "DELETE FROM 月工资统计表 WHERE (职员编号 = @Original_职员编号) AND (个人所得税 = @Original_个人所得税 OR " +
- "@Original_个人所得税 IS NULL AND 个人所得税 IS NULL) AND (临时补 = @Original_临时补 OR @Original" +
- "_临时补 IS NULL AND 临时补 IS NULL) AND (住房公积金 = @Original_住房公积金 OR @Original_住房公积金 IS" +
- " NULL AND 住房公积金 IS NULL) AND (养老保险 = @Original_养老保险 OR @Original_养老保险 IS NULL AN" +
- "D 养老保险 IS NULL) AND (医疗保险 = @Original_医疗保险 OR @Original_医疗保险 IS NULL AND 医疗保险 IS" +
- " NULL) AND (发放否 = @Original_发放否 OR @Original_发放否 IS NULL AND 发放否 IS NULL) AND (合" +
- "同补 = @Original_合同补 OR @Original_合同补 IS NULL AND 合同补 IS NULL) AND (基本工资 = @Origin" +
- "al_基本工资 OR @Original_基本工资 IS NULL AND 基本工资 IS NULL) AND (失业保险 = @Original_失业保险 O" +
- "R @Original_失业保险 IS NULL AND 失业保险 IS NULL) AND (奖金 = @Original_奖金 OR @Original_奖" +
- "金 IS NULL AND 奖金 IS NULL) AND (实发金额 = @Original_实发金额 OR @Original_实发金额 IS NULL A" +
- "ND 实发金额 IS NULL) AND (工伤保险 = @Original_工伤保险 OR @Original_工伤保险 IS NULL AND 工伤保险 I" +
- "S NULL) AND (工资合计 = @Original_工资合计 OR @Original_工资合计 IS NULL AND 工资合计 IS NULL) A" +
- "ND (工龄工资 = @Original_工龄工资 OR @Original_工龄工资 IS NULL AND 工龄工资 IS NULL) AND (应发金额合" +
- "计 = @Original_应发金额合计 OR @Original_应发金额合计 IS NULL AND 应发金额合计 IS NULL) AND (应扣金额合计" +
- " = @Original_应扣金额合计 OR @Original_应扣金额合计 IS NULL AND 应扣金额合计 IS NULL) AND (房租 = @O" +
- "riginal_房租 OR @Original_房租 IS NULL AND 房租 IS NULL) AND (房补 = @Original_房补 OR @Or" +
- "iginal_房补 IS NULL AND 房补 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL" +
- " AND 日期 IS NULL) AND (月份 = @Original_月份 OR @Original_月份 IS NULL AND 月份 IS NULL) " +
- "AND (水电费 = @Original_水电费 OR @Original_水电费 IS NULL AND 水电费 IS NULL) AND (浮动工资 = @" +
- "Original_浮动工资 OR @Original_浮动工资 IS NULL AND 浮动工资 IS NULL) AND (生育保险 = @Original_" +
- "生育保险 OR @Original_生育保险 IS NULL AND 生育保险 IS NULL) AND (粮副补 = @Original_粮副补 OR @Or" +
- "iginal_粮副补 IS NULL AND 粮副补 IS NULL) AND (罚款 = @Original_罚款 OR @Original_罚款 IS NU" +
- "LL AND 罚款 IS NULL) AND (考勤扣除 = @Original_考勤扣除 OR @Original_考勤扣除 IS NULL AND 考勤扣除" +
- " IS NULL) AND (考核工资 = @Original_考核工资 OR @Original_考核工资 IS NULL AND 考核工资 IS NULL)" +
- " AND (职务工资 = @Original_职务工资 OR @Original_职务工资 IS NULL AND 职务工资 IS NULL) AND (请假扣" +
- "除 = @Original_请假扣除 OR @Original_请假扣除 IS NULL AND 请假扣除 IS NULL)";
- this.sqlDeleteCommand1.Connection = this.sqlConnection1;
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职员编号", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职员编号", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_个人所得税", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "个人所得税", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_临时补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "临时补", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_住房公积金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "住房公积金", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_养老保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "养老保险", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_医疗保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "医疗保险", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_发放否", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "发放否", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_合同补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "合同补", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_基本工资", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "基本工资", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_失业保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "失业保险", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_奖金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "奖金", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_实发金额", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "实发金额", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工伤保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工伤保险", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工资合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工资合计", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工龄工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工龄工资", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_应发金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应发金额合计", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_应扣金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应扣金额合计", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_房租", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房租", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_房补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房补", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_月份", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "月份", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_水电费", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "水电费", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_浮动工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "浮动工资", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_生育保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "生育保险", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_粮副补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "粮副补", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_罚款", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "罚款", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_考勤扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考勤扣除", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_考核工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考核工资", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职务工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "职务工资", System.Data.DataRowVersion.Original, null));
- this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_请假扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "请假扣除", System.Data.DataRowVersion.Original, null));
- //
- // sqlInsertCommand1
- //
- this.sqlInsertCommand1.CommandText = @"INSERT INTO 月工资统计表(日期, 职员编号, 基本工资, 浮动工资, 合同补, 粮副补, 房补, 临时补, 职务工资, 工龄工资, 考核工资, 奖金, 应发金额合计, 房租, 水电费, 请假扣除, 考勤扣除, 罚款, 住房公积金, 医疗保险, 养老保险, 失业保险, 生育保险, 工伤保险, 应扣金额合计, 工资合计, 个人所得税, 实发金额, 发放否, 月份) VALUES (@日期, @职员编号, @基本工资, @浮动工资, @合同补, @粮副补, @房补, @临时补, @职务工资, @工龄工资, @考核工资, @奖金, @应发金额合计, @房租, @水电费, @请假扣除, @考勤扣除, @罚款, @住房公积金, @医疗保险, @养老保险, @失业保险, @生育保险, @工伤保险, @应扣金额合计, @工资合计, @个人所得税, @实发金额, @发放否, @月份); SELECT 日期, 职员编号, 基本工资, 浮动工资, 合同补, 粮副补, 房补, 临时补, 职务工资, 工龄工资, 考核工资, 奖金, 应发金额合计, 房租, 水电费, 请假扣除, 考勤扣除, 罚款, 住房公积金, 医疗保险, 养老保险, 失业保险, 生育保险, 工伤保险, 应扣金额合计, 工资合计, 个人所得税, 实发金额, 发放否, 月份 FROM 月工资统计表 WHERE (职员编号 = @职员编号)";
- this.sqlInsertCommand1.Connection = this.sqlConnection1;
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.Int, 4, "日期"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职员编号", System.Data.SqlDbType.VarChar, 30, "职员编号"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@基本工资", System.Data.SqlDbType.Float, 8, "基本工资"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@浮动工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "浮动工资", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@合同补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "合同补", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@粮副补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "粮副补", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@房补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房补", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@临时补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "临时补", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职务工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "职务工资", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工龄工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工龄工资", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@考核工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考核工资", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@奖金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "奖金", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@应发金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应发金额合计", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@房租", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房租", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@水电费", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "水电费", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@请假扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "请假扣除", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@考勤扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考勤扣除", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@罚款", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "罚款", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@住房公积金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "住房公积金", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@医疗保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "医疗保险", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@养老保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "养老保险", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@失业保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "失业保险", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@生育保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "生育保险", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工伤保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工伤保险", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@应扣金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应扣金额合计", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工资合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工资合计", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@个人所得税", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "个人所得税", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@实发金额", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "实发金额", System.Data.DataRowVersion.Current, null));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发放否", System.Data.SqlDbType.VarChar, 10, "发放否"));
- this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@月份", System.Data.SqlDbType.Int, 4, "月份"));
- //
- // sqlSelectCommand2
- //
- this.sqlSelectCommand2.CommandText = "SELECT 日期, 职员编号, 基本工资, 浮动工资, 合同补, 粮副补, 房补, 临时补, 职务工资, 工龄工资, 考核工资, 奖金, 应发金额合计, 房租," +
- " 水电费, 请假扣除, 考勤扣除, 罚款, 住房公积金, 医疗保险, 养老保险, 失业保险, 生育保险, 工伤保险, 应扣金额合计, 工资合计, 个人所得税, " +
- "实发金额, 发放否, 月份 FROM 月工资统计表";
- this.sqlSelectCommand2.Connection = this.sqlConnection1;
- //
- // sqlUpdateCommand1
- //
- this.sqlUpdateCommand1.CommandText = "UPDATE 月工资统计表 SET 日期 = @日期, 职员编号 = @职员编号, 基本工资 = @基本工资, 浮动工资 = @浮动工资, 合同补 = @合同补," +
- " 粮副补 = @粮副补, 房补 = @房补, 临时补 = @临时补, 职务工资 = @职务工资, 工龄工资 = @工龄工资, 考核工资 = @考核工资, 奖金 " +
- "= @奖金, 应发金额合计 = @应发金额合计, 房租 = @房租, 水电费 = @水电费, 请假扣除 = @请假扣除, 考勤扣除 = @考勤扣除, 罚款 = " +
- "@罚款, 住房公积金 = @住房公积金, 医疗保险 = @医疗保险, 养老保险 = @养老保险, 失业保险 = @失业保险, 生育保险 = @生育保险, 工伤保" +
- "险 = @工伤保险, 应扣金额合计 = @应扣金额合计, 工资合计 = @工资合计, 个人所得税 = @个人所得税, 实发金额 = @实发金额, 发放否 = @" +
- "发放否, 月份 = @月份 WHERE (职员编号 = @Original_职员编号) AND (个人所得税 = @Original_个人所得税 OR @Ori" +
- "ginal_个人所得税 IS NULL AND 个人所得税 IS NULL) AND (临时补 = @Original_临时补 OR @Original_临时补" +
- " IS NULL AND 临时补 IS NULL) AND (住房公积金 = @Original_住房公积金 OR @Original_住房公积金 IS NUL" +
- "L AND 住房公积金 IS NULL) AND (养老保险 = @Original_养老保险 OR @Original_养老保险 IS NULL AND 养老" +
- "保险 IS NULL) AND (医疗保险 = @Original_医疗保险 OR @Original_医疗保险 IS NULL AND 医疗保险 IS NUL" +
- "L) AND (发放否 = @Original_发放否 OR @Original_发放否 IS NULL AND 发放否 IS NULL) AND (合同补 =" +
- " @Original_合同补 OR @Original_合同补 IS NULL AND 合同补 IS NULL) AND (基本工资 = @Original_基" +
- "本工资 OR @Original_基本工资 IS NULL AND 基本工资 IS NULL) AND (失业保险 = @Original_失业保险 OR @O" +
- "riginal_失业保险 IS NULL AND 失业保险 IS NULL) AND (奖金 = @Original_奖金 OR @Original_奖金 IS" +
- " NULL AND 奖金 IS NULL) AND (实发金额 = @Original_实发金额 OR @Original_实发金额 IS NULL AND 实" +
- "发金额 IS NULL) AND (工伤保险 = @Original_工伤保险 OR @Original_工伤保险 IS NULL AND 工伤保险 IS NU" +
- "LL) AND (工资合计 = @Original_工资合计 OR @Original_工资合计 IS NULL AND 工资合计 IS NULL) AND (" +
- "工龄工资 = @Original_工龄工资 OR @Original_工龄工资 IS NULL AND 工龄工资 IS NULL) AND (应发金额合计 = " +
- "@Original_应发金额合计 OR @Original_应发金额合计 IS NULL AND 应发金额合计 IS NULL) AND (应扣金额合计 = @" +
- "Original_应扣金额合计 OR @Original_应扣金额合计 IS NULL AND 应扣金额合计 IS NULL) AND (房租 = @Origi" +
- "nal_房租 OR @Original_房租 IS NULL AND 房租 IS NULL) AND (房补 = @Original_房补 OR @Origin" +
- "al_房补 IS NULL AND 房补 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND" +
- " 日期 IS NULL) AND (月份 = @Original_月份 OR @Original_月份 IS NULL AND 月份 IS NULL) AND " +
- "(水电费 = @Original_水电费 OR @Original_水电费 IS NULL AND 水电费 IS NULL) AND (浮动工资 = @Orig" +
- "inal_浮动工资 OR @Original_浮动工资 IS NULL AND 浮动工资 IS NULL) AND (生育保险 = @Original_生育保险" +
- " OR @Original_生育保险 IS NULL AND 生育保险 IS NULL) AND (粮副补 = @Original_粮副补 OR @Origin" +
- "al_粮副补 IS NULL AND 粮副补 IS NULL) AND (罚款 = @Original_罚款 OR @Original_罚款 IS NULL A" +
- "ND 罚款 IS NULL) AND (考勤扣除 = @Original_考勤扣除 OR @Original_考勤扣除 IS NULL AND 考勤扣除 IS " +
- "NULL) AND (考核工资 = @Original_考核工资 OR @Original_考核工资 IS NULL AND 考核工资 IS NULL) AND" +
- " (职务工资 = @Original_职务工资 OR @Original_职务工资 IS NULL AND 职务工资 IS NULL) AND (请假扣除 = " +
- "@Original_请假扣除 OR @Original_请假扣除 IS NULL AND 请假扣除 IS NULL); SELECT 日期, 职员编号, 基本工" +
- "资, 浮动工资, 合同补, 粮副补, 房补, 临时补, 职务工资, 工龄工资, 考核工资, 奖金, 应发金额合计, 房租, 水电费, 请假扣除, 考勤扣除, 罚" +
- "款, 住房公积金, 医疗保险, 养老保险, 失业保险, 生育保险, 工伤保险, 应扣金额合计, 工资合计, 个人所得税, 实发金额, 发放否, 月份 FROM " +
- "月工资统计表 WHERE (职员编号 = @职员编号)";
- this.sqlUpdateCommand1.Connection = this.sqlConnection1;
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.Int, 4, "日期"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职员编号", System.Data.SqlDbType.VarChar, 30, "职员编号"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@基本工资", System.Data.SqlDbType.Float, 8, "基本工资"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@浮动工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "浮动工资", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@合同补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "合同补", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@粮副补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "粮副补", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@房补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房补", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@临时补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "临时补", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职务工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "职务工资", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工龄工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工龄工资", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@考核工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考核工资", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@奖金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "奖金", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@应发金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应发金额合计", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@房租", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房租", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@水电费", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "水电费", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@请假扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "请假扣除", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@考勤扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考勤扣除", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@罚款", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "罚款", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@住房公积金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "住房公积金", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@医疗保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "医疗保险", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@养老保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "养老保险", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@失业保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "失业保险", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@生育保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "生育保险", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工伤保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工伤保险", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@应扣金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应扣金额合计", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@工资合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工资合计", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@个人所得税", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "个人所得税", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@实发金额", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "实发金额", System.Data.DataRowVersion.Current, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@发放否", System.Data.SqlDbType.VarChar, 10, "发放否"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@月份", System.Data.SqlDbType.Int, 4, "月份"));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职员编号", System.Data.SqlDbType.VarChar, 30, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职员编号", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_个人所得税", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "个人所得税", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_临时补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "临时补", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_住房公积金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "住房公积金", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_养老保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "养老保险", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_医疗保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "医疗保险", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_发放否", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "发放否", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_合同补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "合同补", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_基本工资", System.Data.SqlDbType.Float, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "基本工资", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_失业保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "失业保险", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_奖金", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "奖金", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_实发金额", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "实发金额", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工伤保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工伤保险", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工资合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工资合计", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_工龄工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "工龄工资", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_应发金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应发金额合计", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_应扣金额合计", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "应扣金额合计", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_房租", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房租", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_房补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "房补", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_月份", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "月份", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_水电费", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "水电费", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_浮动工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "浮动工资", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_生育保险", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "生育保险", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_粮副补", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "粮副补", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_罚款", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "罚款", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_考勤扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考勤扣除", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_考核工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "考核工资", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职务工资", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "职务工资", System.Data.DataRowVersion.Original, null));
- this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_请假扣除", System.Data.SqlDbType.Decimal, 13, System.Data.ParameterDirection.Input, false, ((System.Byte)(26)), ((System.Byte)(2)), "请假扣除", System.Data.DataRowVersion.Original, null));
- //
- // SalaryManage
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(640, 445);
- this.Controls.Add(this.toolBar1);
- this.Controls.Add(this.dataGrid1);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.groupBox1);
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.Name = "SalaryManage";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "【当月工资管理】";
- this.Load += new System.EventHandler(this.WageManage_Load);
- this.groupBox1.ResumeLayout(false);
- this.groupBox2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- //--------------------初始化窗体,读入数据------------------
- private void WageManage_Load(object sender, System.EventArgs e)
- {
- this.sqlDataAdapter1.Fill(datagridTempTable);//该表用来储存要在表格中显示的数据
- this.sqlDataAdapter2.Fill(tempTable);//该表用来储存要在下面的文本框中显示并供修改的数据
- this.dataGrid1.DataSource = datagridTempTable.DefaultView;//在表格中显示数据
- DataGridStateControl();
- DataBindingsFunction();
- cmSalary = (CurrencyManager) BindingContext[tempTable];
- }
- //--------------将数据显示在表格中,并设置表格参数------------------
- private void DataGridStateControl()
- {
- DataGridTableStyle ts = new DataGridTableStyle();
- DataGridNoActiveCellColumn aColumnTextColumn;
- ts.AlternatingBackColor = Color.LightGray;
- ts.MappingName = datagridTempTable.TableName;
- ts.AllowSorting = false;//不允许排序
- int numCols = datagridTempTable.Columns.Count;
- for (int i = 0;i< datagridTempTable.Columns.Count-2;i++) //不显示最后两列的“职员编号”
- {
- aColumnTextColumn = new DataGridNoActiveCellColumn();
- aColumnTextColumn.MappingName = datagridTempTable.Columns[i].ColumnName;
- aColumnTextColumn.HeaderText = datagridTempTable.Columns[i].ColumnName;
- aColumnTextColumn.NullText = "";
- aColumnTextColumn.Format = "D";
- ts.GridColumnStyles.Add(aColumnTextColumn);
- }
- this.dataGrid1.TableStyles.Add(ts);
- this.dataGrid1.Select(0);//选中第一条数据
- }
- //--------------为面板中的文本框绑定数据集中的相应字段------------------
- private void DataBindingsFunction()
- {
- this.txt1.DataBindings.Add("Text",tempTable,"基本工资");
- this.txt2.DataBindings.Add("Text",tempTable,"浮动工资");
- this.txt3.DataBindings.Add("Text",tempTable,"合同补");
- this.txt4.DataBindings.Add("Text",tempTable,"粮副补");
- this.txt5.DataBindings.Add("Text",tempTable,"房补");
- this.txt6.DataBindings.Add("Text",tempTable,"临时补");
- this.txt7.DataBindings.Add("Text",tempTable,"职务工资");
- this.txt8.DataBindings.Add("Text",tempTable,"工龄工资");
- this.txt9.DataBindings.Add("Text",tempTable,"考核工资");
- this.txt10.DataBindings.Add("Text",tempTable,"奖金");
- this.txt11.DataBindings.Add("Text",tempTable,"房租");
- this.txt12.DataBindings.Add("Text",tempTable,"水电费");
- this.txt13.DataBindings.Add("Text",tempTable,"请假扣除");
- this.txt14.DataBindings.Add("Text",tempTable,"考勤扣除");
- this.txt15.DataBindings.Add("Text",tempTable,"罚款");
- this.txt16.DataBindings.Add("Text",tempTable,"住房公积金");
- this.txt17.DataBindings.Add("Text",tempTable,"医疗保险");
- this.txt18.DataBindings.Add("Text",tempTable,"养老保险");
- this.txt19.DataBindings.Add("Text",tempTable,"失业保险");
- this.txt20.DataBindings.Add("Text",tempTable,"生育保险");
- this.txt21.DataBindings.Add("Text",tempTable,"工伤保险");
- this.txt22.DataBindings.Add("Text",tempTable,"月份");
- }
- //------调用储存过程,导入工资历史------------------
- private void btnGetSalary_Click(object sender, System.EventArgs e)
- {
- try
- {
- string tempStrSQL = "exec sf_形成月工资统计表 '" + this.txt23.Text.Trim() +"','" + this.txt22.Text.Trim()+ "'";
- if (sqlConnection1.State == System.Data.ConnectionState.Closed)
- this.sqlConnection1.Open();
- SqlCommand tempSqlCommand = new SqlCommand(tempStrSQL,this.sqlConnection1);
- tempSqlCommand.ExecuteNonQuery();
- this.sqlConnection1.Close();
- //刷新表格中显示的数据
- datagridTempTable.Clear();
- tempTable.Clear();
- this.sqlDataAdapter1.Fill(datagridTempTable);
- this.sqlDataAdapter2.Fill(tempTable);
- this.dataGrid1.DataSource = datagridTempTable.DefaultView;
- }
- catch(Exception express)
- {
- if (sqlConnection1.State == System.Data.ConnectionState.Open)
- this.sqlConnection1.Close();
- MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- //------调用储存过程,计算当月工资------------------
- private void btnCalSalary_Click(object sender, System.EventArgs e)
- {
- try
- {
- string tempStrSQL = "exec sf_当月工资统计";
- if (sqlConnection1.State == System.Data.ConnectionState.Closed)
- this.sqlConnection1.Open();
- SqlCommand tempSqlCommand = new SqlCommand(tempStrSQL,this.sqlConnection1);
- tempSqlCommand.ExecuteNonQuery();
- this.sqlConnection1.Close();
- //刷新表格中显示的数据
- datagridTempTable.Clear();
- tempTable.Clear();
- this.sqlDataAdapter1.Fill(datagridTempTable);
- this.sqlDataAdapter2.Fill(tempTable);
- this.dataGrid1.DataSource = datagridTempTable.DefaultView;
- }
- catch(Exception express)
- {
- if (sqlConnection1.State == System.Data.ConnectionState.Open)
- this.sqlConnection1.Close();
- MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- //--------发放当月工资------------------
- private void btnGiveSalary_Click(object sender, System.EventArgs e)
- {
- if (this.datagridTempTable.Rows.Count <= 0)//如果表格为空,则表示工资已经发放完毕
- {
- MessageBox.Show("工资已发放完毕!","提示");
- return;
- }
- string strMessage = " 是否为(" + datagridTempTable.Rows[dataGrid1.CurrentCell.RowNumber][0].ToString().Trim() + ")" + "发放工资?";
- if (MessageBox.Show(strMessage,"询问",MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- try
- {
- //调用储存过程分,发放选中员工的工资
- int rowNumber = this.dataGrid1.CurrentCell.RowNumber;
- int columnNumber = this.datagridTempTable.Columns.Count-1;
- string tempStrID = datagridTempTable.Rows[rowNumber][columnNumber].ToString().Trim();
- string tempStrSQL = "exec sf_当月工资发放 '" + tempStrID + "'";
- if (sqlConnection1.State == System.Data.ConnectionState.Closed)
- this.sqlConnection1.Open();
- SqlCommand tempSqlCommand = new SqlCommand(tempStrSQL,this.sqlConnection1);
- tempSqlCommand.ExecuteNonQuery();
- //更新数据集和表格
- this.datagridTempTable.Clear();
- this.sqlDataAdapter1.Fill(datagridTempTable);
- if(datagridTempTable.Rows.Count >0)
- {
- if (rowNumber < this.datagridTempTable.Rows.Count)
- {
- this.dataGrid1.CurrentRowIndex = rowNumber;
- this.dataGrid1.Select(rowNumber);
- }
- else
- {
- this.dataGrid1.CurrentRowIndex = rowNumber-1;
- this.dataGrid1.Select(this.datagridTempTable.Rows.Count-1);
- }
- }
- this.sqlConnection1.Close();
- }
- catch(Exception express)
- {
- if (sqlConnection1.State == System.Data.ConnectionState.Open)
- this.sqlConnection1.Close();
- MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- }
- //-----------处理数据导航按钮与新增修改等事务---------------
- private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
- {
- if (e.Button.ToolTipText == "首记录")
- {
- this.dataGrid1.UnSelect(cmSalary.Position); //取消选中指定行
- cmSalary.Position = 0;
- this.dataGrid1.Select(cmSalary.Position); //选中指定行
- this.dataGrid1.CurrentRowIndex = cmSalary.Position; //移动表头指示图标
- return;
- }
- if (e.Button.ToolTipText == "上一记录")
- {
- if (cmSalary.Position > 0)
- {
- this.dataGrid1.UnSelect(cmSalary.Position);
- cmSalary.Position--;
- this.dataGrid1.Select(cmSalary.Position);
- this.dataGrid1.CurrentRowIndex = cmSalary.Position;
- }
- return;
- }
- if (e.Button.ToolTipText == "下一记录")
- {
- if (cmSalary.Position < cmSalary.Count-1)
- {
- this.dataGrid1.UnSelect(cmSalary.Position);
- cmSalary.Position++;
- this.dataGrid1.Select(cmSalary.Position);
- this.dataGrid1.CurrentRowIndex = cmSalary.Position;
- }
- return;
- }
- if (e.Button.ToolTipText == "尾记录")
- {
- this.dataGrid1.UnSelect(cmSalary.Position);
- cmSalary.Position = cmSalary.Count-1;
- this.dataGrid1.Select(cmSalary.Position);
- this.dataGrid1.CurrentRowIndex = cmSalary.Position;
- return;
- }
- if (e.Button.ToolTipText == "取消修改")
- {
- try
- {
- cmSalary.CancelCurrentEdit(); //取消编辑
- }
- catch(Exception express)
- {
- MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- return;
- }
- if (e.Button.ToolTipText == "提交修改")
- {
- if (this.txt1.Text.Trim() == "")
- {
- MessageBox.Show("职员编号不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- return;
- }
- cmSalary.EndCurrentEdit();
- if (tempTable.GetChanges() != null)
- {
- try
- {
- this.sqlDataAdapter2.Update(tempTable);
- }
- catch(Exception express)
- {
- MessageBox.Show(express.ToString(),"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- return;
- }
- if (e.Button.ToolTipText == "退出")
- {
- this.Close();
- }
- }
- //---当在dataGrid中移动指针指向不同数据记录时,与数据集绑定的文本框中的内容也随之移动----
- private void dataGrid1_CurrentCellChanged(object sender, System.EventArgs e)
- {
- if (this.datagridTempTable.Rows.Count > 0)
- {
- int currentRowNumber = this.dataGrid1.CurrentCell.RowNumber;
- if (currentRowNumber >= 0 && currentRowNumber < cmSalary.Count)
- cmSalary.Position = currentRowNumber;
- }
- }
- }
- }