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

📄 formnewemployee.cs

📁 蓝山人事管理系统
💻 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 ;
using System.Text ;
using System.Security .Cryptography ;

namespace BlueHill.BlueHillWindows.EmployeeManagement
{
	/// <summary>
	/// FormNewEmployee 的摘要说明。
	/// </summary>
	public class FormNewEmployee : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		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 label7;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Button buttonUploadPhoto;
		private System.Windows.Forms.Button btnNewEmployee;
	
		private System.Windows.Forms.PictureBox picPhoto;
		private System.Windows.Forms.CheckBox chkPrint;
		private System.Windows.Forms.Button btnCancel;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox txtName;
		private System.Windows.Forms.TextBox txtPassword;
		private System.Windows.Forms.TextBox txtBirthday;
		private System.Windows.Forms.TextBox txtEmail;
		private System.Windows.Forms.TextBox txtUserName;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.TextBox txtTel;
		private System.Windows.Forms.NumericUpDown numLevel;
	
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.TextBox txtPos;
		private System.Windows.Forms.TextBox txtBaseSalary;
		private System.Windows.Forms.Label txtPos1;
	    public System.Windows.Forms.ComboBox cbDepartment;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.PictureBox pictureBox2;
		private System.Windows.Forms.PictureBox pictureBox4;
		private System.Windows.Forms.PictureBox pictureBox5;
		private System.Windows.Forms.PictureBox pictureBox3;
		private System.Windows.Forms.PictureBox pictureBox6;
		SqlConnection conn =null;
		SqlDataAdapter adp=null;
		public FormPhotoPath photo=new FormPhotoPath();
		byte[] imgb;

		SqlCommand com=null;
		private System.Windows.Forms.OpenFileDialog OpenFileDialogPhoto;

	    private System.ComponentModel.Container components = null;
	
		
		public FormNewEmployee()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		public bool IsNumber(string str)
		{
			foreach(char c in str.ToCharArray())
			{
				int asc=c;
				if (asc<48 || asc>57)
					return false;
			}
			return true;
		}
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FormNewEmployee));
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.txtPos1 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.txtName = new System.Windows.Forms.TextBox();
			this.txtUserName = new System.Windows.Forms.TextBox();
			this.txtPassword = new System.Windows.Forms.TextBox();
			this.txtBirthday = new System.Windows.Forms.TextBox();
			this.txtEmail = new System.Windows.Forms.TextBox();
			this.txtBaseSalary = new System.Windows.Forms.TextBox();
			this.txtPos = new System.Windows.Forms.TextBox();
			this.txtTel = new System.Windows.Forms.TextBox();
			this.numLevel = new System.Windows.Forms.NumericUpDown();
			this.picPhoto = new System.Windows.Forms.PictureBox();
			this.buttonUploadPhoto = new System.Windows.Forms.Button();
			this.chkPrint = new System.Windows.Forms.CheckBox();
			this.btnNewEmployee = new System.Windows.Forms.Button();
			this.btnCancel = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label6 = new System.Windows.Forms.Label();
			this.cbDepartment = new System.Windows.Forms.ComboBox();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.pictureBox2 = new System.Windows.Forms.PictureBox();
			this.pictureBox4 = new System.Windows.Forms.PictureBox();
			this.pictureBox5 = new System.Windows.Forms.PictureBox();
			this.pictureBox3 = new System.Windows.Forms.PictureBox();
			this.pictureBox6 = new System.Windows.Forms.PictureBox();
			this.OpenFileDialogPhoto = new System.Windows.Forms.OpenFileDialog();
			((System.ComponentModel.ISupportInitialize)(this.numLevel)).BeginInit();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(48, 16);
			this.label1.Name = "label1";
			this.label1.TabIndex = 0;
			this.label1.Text = "姓名";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(48, 48);
			this.label2.Name = "label2";
			this.label2.TabIndex = 1;
			this.label2.Text = "登录名";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(48, 80);
			this.label3.Name = "label3";
			this.label3.TabIndex = 2;
			this.label3.Text = "密码";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(48, 112);
			this.label4.Name = "label4";
			this.label4.TabIndex = 3;
			this.label4.Text = "出生年月";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(48, 144);
			this.label5.Name = "label5";
			this.label5.TabIndex = 4;
			this.label5.Text = "电子邮件";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(48, 176);
			this.label8.Name = "label8";
			this.label8.TabIndex = 5;
			this.label8.Text = "所属部门";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(48, 208);
			this.label7.Name = "label7";
			this.label7.TabIndex = 6;
			this.label7.Text = "基本薪资";
			// 
			// txtPos1
			// 
			this.txtPos1.Location = new System.Drawing.Point(368, 248);
			this.txtPos1.Name = "txtPos1";
			this.txtPos1.Size = new System.Drawing.Size(56, 23);
			this.txtPos1.TabIndex = 8;
			this.txtPos1.Text = "职位";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(368, 288);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(56, 23);
			this.label10.TabIndex = 9;
			this.label10.Text = "电话";
			// 
			// txtName
			// 
			this.txtName.Location = new System.Drawing.Point(176, 16);
			this.txtName.Name = "txtName";
			this.txtName.TabIndex = 10;
			this.txtName.Text = "";
			// 
			// txtUserName
			// 
			this.txtUserName.Location = new System.Drawing.Point(176, 48);
			this.txtUserName.Name = "txtUserName";
			this.txtUserName.TabIndex = 11;
			this.txtUserName.Text = "";
			// 
			// txtPassword
			// 
			this.txtPassword.Location = new System.Drawing.Point(176, 80);
			this.txtPassword.Name = "txtPassword";
			this.txtPassword.TabIndex = 12;
			this.txtPassword.Text = "";
			// 
			// txtBirthday
			// 
			this.txtBirthday.Location = new System.Drawing.Point(176, 112);
			this.txtBirthday.Name = "txtBirthday";
			this.txtBirthday.TabIndex = 13;
			this.txtBirthday.Text = "";
			// 
			// txtEmail
			// 
			this.txtEmail.Location = new System.Drawing.Point(176, 144);
			this.txtEmail.Name = "txtEmail";
			this.txtEmail.TabIndex = 14;
			this.txtEmail.Text = "";
			// 
			// txtBaseSalary
			// 
			this.txtBaseSalary.Location = new System.Drawing.Point(176, 208);
			this.txtBaseSalary.Name = "txtBaseSalary";
			this.txtBaseSalary.TabIndex = 15;
			this.txtBaseSalary.Text = "";
			// 
			// txtPos
			// 
			this.txtPos.Location = new System.Drawing.Point(432, 248);
			this.txtPos.Name = "txtPos";
			this.txtPos.TabIndex = 16;
			this.txtPos.Text = "";
			// 
			// txtTel
			// 
			this.txtTel.Location = new System.Drawing.Point(440, 288);
			this.txtTel.Name = "txtTel";
			this.txtTel.TabIndex = 17;
			this.txtTel.Text = "";
			// 
			// numLevel
			// 
			this.numLevel.Location = new System.Drawing.Point(176, 240);
			this.numLevel.Name = "numLevel";
			this.numLevel.TabIndex = 19;
			this.numLevel.Value = new System.Decimal(new int[] {
																   1,
																   0,
																   0,
																   0});
			// 
			// picPhoto
			// 
			this.picPhoto.Image = ((System.Drawing.Image)(resources.GetObject("picPhoto.Image")));
			this.picPhoto.Location = new System.Drawing.Point(32, 24);
			this.picPhoto.Name = "picPhoto";
			this.picPhoto.Size = new System.Drawing.Size(112, 128);
			this.picPhoto.TabIndex = 0;
			this.picPhoto.TabStop = false;
			// 
			// buttonUploadPhoto
			// 
			this.buttonUploadPhoto.Location = new System.Drawing.Point(56, 160);

⌨️ 快捷键说明

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