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

📄 frmpunish.cs

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

namespace 人力资源管理系统
{
	/// <summary>
	/// frmPunish 的摘要说明。
	/// </summary>
	public class frmPunish : System.Windows.Forms.Form
	{
		internal System.Data.SqlClient.SqlCommand SqlUpdateCommand1;
		internal System.Data.SqlClient.SqlCommand SqlSelectCommand1;
		internal System.Data.SqlClient.SqlCommand SqlInsertCommand1;
		internal System.Windows.Forms.ImageList ImageList1;
		internal System.Windows.Forms.DataGrid dgdPunishInfo;
		internal System.Windows.Forms.ToolBarButton tbbDel;
		internal System.Data.SqlClient.SqlCommand SqlDeleteCommand1;
		internal System.Windows.Forms.ToolBar ToolBar1;
		internal System.Windows.Forms.ToolBarButton tbbSave;
		private System.ComponentModel.IContainer components;
		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 DataView dvResult;

		public frmPunish()
		{
			//
			// 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(frmPunish));
			this.SqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.SqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.SqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.ImageList1 = new System.Windows.Forms.ImageList(this.components);
			this.dgdPunishInfo = new System.Windows.Forms.DataGrid();
			this.tbbDel = new System.Windows.Forms.ToolBarButton();
			this.SqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.ToolBar1 = new System.Windows.Forms.ToolBar();
			this.tbbSave = new System.Windows.Forms.ToolBarButton();
			this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlInsertCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlDeleteCommand2 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.dataSet11 = new 人力资源管理系统.DataSet1();
			((System.ComponentModel.ISupportInitialize)(this.dgdPunishInfo)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.dataSet11)).BeginInit();
			this.SuspendLayout();
			// 
			// SqlUpdateCommand1
			// 
			this.SqlUpdateCommand1.CommandText = @"UPDATE 职员惩罚表 SET 职员编号 = @职员编号, 惩罚类型 = @惩罚类型, 惩罚金额 = @惩罚金额, 是否计入工资 = @是否计入工资, 惩罚原因 = @惩罚原因, 部门意见 = @部门意见, 惩罚日期 = @惩罚日期 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 AND 惩罚金额 IS NULL) AND (是否计入工资 = @Original_是否计入工资 OR @Original_是否计入工资 IS NULL AND 是否计入工资 IS NULL) AND (职员编号 = @Original_职员编号) AND (部门意见 = @Original_部门意见 OR @Original_部门意见 IS NULL AND 部门意见 IS NULL); SELECT 序号, 职员编号, 惩罚类型, 惩罚金额, 是否计入工资, 惩罚原因, 部门意见, 惩罚日期 FROM 职员惩罚表 WHERE (序号 = @序号)";
			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.VarChar, 20, "惩罚类型"));
			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.VarChar, 10, "是否计入工资"));
			this.SqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@惩罚原因", System.Data.SqlDbType.VarChar, 50, "惩罚原因"));
			this.SqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@部门意见", System.Data.SqlDbType.VarChar, 100, "部门意见"));
			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.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.VarChar, 50, 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.VarChar, 20, 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.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.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.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.VarChar, 100, 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("@序号", System.Data.SqlDbType.Int, 4, "序号"));
			// 
			// SqlSelectCommand1
			// 
			this.SqlSelectCommand1.CommandText = "SELECT 序号, 职员编号, 惩罚类型, 惩罚金额, 是否计入工资, 惩罚原因, 部门意见, 惩罚日期 FROM 职员惩罚表";
			// 
			// SqlInsertCommand1
			// 
			this.SqlInsertCommand1.CommandText = "INSERT INTO 职员惩罚表(职员编号, 惩罚类型, 惩罚金额, 是否计入工资, 惩罚原因, 部门意见, 惩罚日期) VALUES (@职员编号, @惩罚类" +
				"型, @惩罚金额, @是否计入工资, @惩罚原因, @部门意见, @惩罚日期); SELECT 序号, 职员编号, 惩罚类型, 惩罚金额, 是否计入工资, 惩罚" +
				"原因, 部门意见, 惩罚日期 FROM 职员惩罚表 WHERE (序号 = @@IDENTITY)";
			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.VarChar, 20, "惩罚类型"));
			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.VarChar, 10, "是否计入工资"));
			this.SqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@惩罚原因", System.Data.SqlDbType.VarChar, 50, "惩罚原因"));
			this.SqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@部门意见", System.Data.SqlDbType.VarChar, 100, "部门意见"));
			this.SqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@惩罚日期", System.Data.SqlDbType.Int, 4, "惩罚日期"));
			// 
			// 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;
			// 
			// dgdPunishInfo
			// 
			this.dgdPunishInfo.CaptionVisible = false;
			this.dgdPunishInfo.DataMember = "";
			this.dgdPunishInfo.Dock = System.Windows.Forms.DockStyle.Fill;
			this.dgdPunishInfo.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dgdPunishInfo.Location = new System.Drawing.Point(0, 0);
			this.dgdPunishInfo.Name = "dgdPunishInfo";
			this.dgdPunishInfo.Size = new System.Drawing.Size(488, 341);
			this.dgdPunishInfo.TabIndex = 16;
			// 
			// tbbDel
			// 
			this.tbbDel.ImageIndex = 1;
			// 
			// 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 AND 惩罚金额 IS NULL) AND (是否计入工资 = @Original_是否计入工资 OR @Original_是否计入工资 IS NULL AND 是否计入工资 IS NULL) AND (职员编号 = @Original_职员编号) AND (部门意见 = @Original_部门意见 OR @Original_部门意见 IS NULL AND 部门意见 IS 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.VarChar, 50, 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.VarChar, 20, 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.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.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.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.VarChar, 100, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "部门意见", System.Data.DataRowVersion.Original, null));
			// 
			// ToolBar1
			// 
			this.ToolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tbbSave,
																						this.tbbDel});
			this.ToolBar1.ButtonSize = new System.Drawing.Size(23, 22);
			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(488, 28);
			this.ToolBar1.TabIndex = 15;
			this.ToolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.ToolBar1_ButtonClick);
			// 
			// tbbSave
			// 
			this.tbbSave.ImageIndex = 0;
			this.tbbSave.ToolTipText = "保存修改记录或新增记录";
			// 
			// sqlDataAdapter1

⌨️ 快捷键说明

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