⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmsalarymanage.cs

📁 环境采用ASP.NET和SQL Server 2000 一款为中小企业量身订做的人力资源管理软件。主要包括以下功能:档案管理、考核管理、工资管理、培训管理、评价管理、合同管理、员工调动、员工离职、员工
💻 CS
📖 第 1 页 / 共 5 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace 人力资源管理系统
{
	/// <summary>
	/// frmSalaryManage 的摘要说明。
	/// </summary>
	public class frmSalaryManage : System.Windows.Forms.Form
	{
		internal System.Windows.Forms.ToolBar ToolBar1;
		internal System.Windows.Forms.ToolBarButton tbbSave;
		internal System.Windows.Forms.ImageList ImageList1;
		internal System.Windows.Forms.GroupBox grbDetail;
		internal System.Windows.Forms.TextBox TextBox21;
		internal System.Windows.Forms.Label Label21;
		internal System.Windows.Forms.TextBox TextBox20;
		internal System.Windows.Forms.Label Label20;
		internal System.Windows.Forms.TextBox TextBox19;
		internal System.Windows.Forms.Label Label19;
		internal System.Windows.Forms.TextBox TextBox18;
		internal System.Windows.Forms.Label Label18;
		internal System.Windows.Forms.TextBox TextBox17;
		internal System.Windows.Forms.Label Label17;
		internal System.Windows.Forms.TextBox TextBox16;
		internal System.Windows.Forms.Label Label16;
		internal System.Windows.Forms.TextBox TextBox15;
		internal System.Windows.Forms.Label Label15;
		internal System.Windows.Forms.TextBox TextBox14;
		internal System.Windows.Forms.Label Label14;
		internal System.Windows.Forms.TextBox TextBox13;
		internal System.Windows.Forms.Label Label13;
		internal System.Windows.Forms.TextBox TextBox12;
		internal System.Windows.Forms.Label Label12;
		internal System.Windows.Forms.TextBox TextBox11;
		internal System.Windows.Forms.Label Label11;
		internal System.Windows.Forms.TextBox TextBox10;
		internal System.Windows.Forms.Label Label10;
		internal System.Windows.Forms.TextBox TextBox9;
		internal System.Windows.Forms.Label Label9;
		internal System.Windows.Forms.TextBox TextBox8;
		internal System.Windows.Forms.Label Label8;
		internal System.Windows.Forms.TextBox TextBox7;
		internal System.Windows.Forms.Label Label7;
		internal System.Windows.Forms.TextBox TextBox6;
		internal System.Windows.Forms.Label Label6;
		internal System.Windows.Forms.TextBox TextBox5;
		internal System.Windows.Forms.Label Label5;
		internal System.Windows.Forms.TextBox TextBox4;
		internal System.Windows.Forms.Label Label4;
		internal System.Windows.Forms.TextBox TextBox3;
		internal System.Windows.Forms.Label Label3;
		internal System.Windows.Forms.TextBox TextBox2;
		internal System.Windows.Forms.Label Label2;
		internal System.Windows.Forms.TextBox TextBox1;
		internal System.Windows.Forms.Label Label1;
		internal System.Data.SqlClient.SqlCommand SqlDeleteCommand1;
		internal System.Data.SqlClient.SqlCommand SqlUpdateCommand1;
		internal System.Data.SqlClient.SqlCommand SqlSelectCommand1;
		internal System.Windows.Forms.DataGrid dgdSalaryInfo;
		internal System.Windows.Forms.GroupBox grbSalaryManage;
		internal System.Windows.Forms.Button btnCalSalary;
		internal System.Windows.Forms.Button btnGiveSalary;
		internal System.Windows.Forms.Button btnGetSalary;
		internal System.Windows.Forms.TextBox txbOldSalary;
		internal System.Windows.Forms.TextBox txbNowSalary;
		internal System.Windows.Forms.Label lblOldSalary;
		internal System.Windows.Forms.Label lblNowSalary;
		internal System.Data.SqlClient.SqlCommand SqlInsertCommand1;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand2;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand2;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand2;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private 人力资源管理系统.DataSet1 dataSet11;
		private System.ComponentModel.IContainer components;

		// added variable
		private DataView dvMaster;
		private int iCurrentLine = -1;

		// added method
		private void LoadData()
		{
			string strSQL = "select 姓名,日期,应罚金额合计,应扣金额合计,工资合计,个人所得税,实发金额,发放否,a.职员编号" +
				" from 职员基本信息表 as a,月工资统计表 as b where a.职员编号=b.职员编号";
			DataBase db = new DataBase();
			dvMaster = db.RunSelectSQL( strSQL );
			dvMaster.AllowDelete = false;
			dvMaster.AllowNew = false;
			dvMaster.AllowEdit = false;
			dgdSalaryInfo.DataSource = dvMaster;
			db.Dispose();
			sqlConnection1.ConnectionString = DataBase.sConn;
			sqlDataAdapter1.Fill( dataSet11 );
		}

		private void LoadDataGridStyle()
		{
			// 定义一个DataGridStyle
			DataGridTableStyle ts = new DataGridTableStyle();
			DataGridTextBoxColumn aCol;
			int numCols = dvMaster.Table.Columns.Count;
			for ( int i = 0; i < numCols; i ++ )
			{
				aCol = new DataGridTextBoxColumn();
				aCol.MappingName = dvMaster.Table.Columns[ i ].ColumnName;
				aCol.HeaderText = dvMaster.Table.Columns[ i ].ColumnName;
				aCol.NullText = "";
				aCol.Width = dvMaster.Table.Columns[ i ].MaxLength;
				if ( i == numCols - 1 )
				{
					aCol.Width = 0;
				}
				ts.GridColumnStyles.Add( aCol );
			}
			ts.AlternatingBackColor = Color.Gray;
			ts.AllowSorting = false;
			ts.MappingName = dvMaster.Table.TableName;
			dgdSalaryInfo.TableStyles.Add( ts );
		}

		public frmSalaryManage()
		{
			//
			// 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(frmSalaryManage));
			this.ToolBar1 = new System.Windows.Forms.ToolBar();
			this.tbbSave = new System.Windows.Forms.ToolBarButton();
			this.ImageList1 = new System.Windows.Forms.ImageList(this.components);
			this.grbDetail = new System.Windows.Forms.GroupBox();
			this.TextBox21 = new System.Windows.Forms.TextBox();
			this.dataSet11 = new 人力资源管理系统.DataSet1();
			this.Label21 = new System.Windows.Forms.Label();
			this.TextBox20 = new System.Windows.Forms.TextBox();
			this.Label20 = new System.Windows.Forms.Label();
			this.TextBox19 = new System.Windows.Forms.TextBox();
			this.Label19 = new System.Windows.Forms.Label();
			this.TextBox18 = new System.Windows.Forms.TextBox();
			this.Label18 = new System.Windows.Forms.Label();
			this.TextBox17 = new System.Windows.Forms.TextBox();
			this.Label17 = new System.Windows.Forms.Label();
			this.TextBox16 = new System.Windows.Forms.TextBox();
			this.Label16 = new System.Windows.Forms.Label();
			this.TextBox15 = new System.Windows.Forms.TextBox();
			this.Label15 = new System.Windows.Forms.Label();
			this.TextBox14 = new System.Windows.Forms.TextBox();
			this.Label14 = new System.Windows.Forms.Label();
			this.TextBox13 = new System.Windows.Forms.TextBox();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -