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

📄 formsettingsalary.cs

📁 蓝山人事管理系统
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data ;


namespace BlueHill.BlueHillWindows.SalaryManagement
{
	/// <summary>
	/// FormSettingSalary 的摘要说明。
	/// </summary>
	public class FormSettingSalary : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button btnOK;
		private System.Windows.Forms.Button btnCancel;


		private System.ComponentModel.Container components = null;


	    Salary sm=new Salary ();
	    FormSalaryManagement rs=new FormSalaryManagement ();
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.PictureBox pictureBox2;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox txtBaseSalary;
		
	


		private int emptId;

		public FormSettingSalary(int id)
		{
		
			InitializeComponent();

			this.emptId =id;
			
		}

		/// 清理所有正在使用的资源。

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FormSettingSalary));
			this.btnOK = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.txtBaseSalary = new System.Windows.Forms.TextBox();
			this.label1 = new System.Windows.Forms.Label();
			this.pictureBox2 = new System.Windows.Forms.PictureBox();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// btnOK
			// 
			this.btnOK.Location = new System.Drawing.Point(144, 152);
			this.btnOK.Name = "btnOK";
			this.btnOK.TabIndex = 1;
			this.btnOK.Text = "确定";
			this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
			// 
			// btnCancel
			// 
			this.btnCancel.Location = new System.Drawing.Point(264, 152);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 2;
			this.btnCancel.Text = "取消";
			this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.txtBaseSalary);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.pictureBox2);
			this.groupBox1.Location = new System.Drawing.Point(16, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(456, 128);
			this.groupBox1.TabIndex = 3;
			this.groupBox1.TabStop = false;
			// 
			// txtBaseSalary
			// 
			this.txtBaseSalary.Location = new System.Drawing.Point(248, 56);
			this.txtBaseSalary.Name = "txtBaseSalary";
			this.txtBaseSalary.Size = new System.Drawing.Size(192, 21);
			this.txtBaseSalary.TabIndex = 2;
			this.txtBaseSalary.Text = "";
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(128, 56);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(72, 23);
			this.label1.TabIndex = 1;
			this.label1.Text = "基本薪资";
			// 
			// pictureBox2
			// 
			this.pictureBox2.AccessibleRole = System.Windows.Forms.AccessibleRole.TitleBar;
			this.pictureBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.BackgroundImage")));
			this.pictureBox2.Location = new System.Drawing.Point(64, 48);
			this.pictureBox2.Name = "pictureBox2";
			this.pictureBox2.Size = new System.Drawing.Size(40, 32);
			this.pictureBox2.TabIndex = 0;
			this.pictureBox2.TabStop = false;
			// 
			// FormSettingSalary
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(488, 189);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.btnCancel);
			this.Controls.Add(this.btnOK);
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "FormSettingSalary";
			this.Text = "基本薪资设定";
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		private void btnCancel_Click(object sender, System.EventArgs e)
		{
			this.Hide ();
			rs.Show ();
		}

		private void btnOK_Click(object sender, System.EventArgs e)
		{
			if(txtBaseSalary.Text == "")
			{
				MessageBox.Show ("请输入基本薪资","注意",MessageBoxButtons.OK ,MessageBoxIcon.Warning  );
			}
			else
			{
				bool f=false;
				if (f==false)
				{
					try
					{	
						string str=txtBaseSalary.Text ;
						int setSalary=System.Convert .ToInt32 (str);
						DateTime nowDate=System.DateTime .Now;
						DataTable dt=sm.FormSettingSalary (this.emptId ,setSalary,nowDate);
					}
					catch
					{
						MessageBox.Show ("请输入正确的格式","注意",MessageBoxButtons.OK,MessageBoxIcon.Warning );
						return;
					}
					this.Hide ();
					rs.Show ();

				}

			}
			



		   

            
		}

	
		
	}
}

⌨️ 快捷键说明

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