?? formmodifyemployee.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data ;
using System.Data .SqlClient ;
namespace BlueHill.BlueHillWindows.EmployeeManagement
{
/// <summary>
/// FormModifyEmployee 的摘要說明。
/// </summary>
public class FormModifyEmployee : 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 label8;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button buttonUploadPhoto;
private System.Windows.Forms.Button btnUpdateEmployee;
public System.Windows.Forms.TextBox txtName;
public System.Windows.Forms.TextBox txtPassword;
public System.Windows.Forms.TextBox txtEmail;
public System.Windows.Forms.TextBox txtUserName;
public System.Windows.Forms.TextBox txtBaseSalary;
private System.Windows.Forms.NumericUpDown numLevel;
public System.Windows.Forms.PictureBox picPhoto;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Label label6;
public System.Windows.Forms.TextBox txtPos;
public System.Windows.Forms.TextBox txtTel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pictureBox3;
private System.Windows.Forms.PictureBox pictureBox4;
private System.Windows.Forms.PictureBox pictureBox5;
SqlConnection conn;
SqlDataAdapter adp;
SqlCommand com;
DataTable dt;
byte[] imgb;
public DataGrid grd;
public DataSet dts;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public FormModifyEmployee()
{
//
// 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(FormModifyEmployee));
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.label7 = new System.Windows.Forms.Label();
this.label8 = 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.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.btnUpdateEmployee = 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.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pictureBox3 = new System.Windows.Forms.PictureBox();
this.pictureBox4 = new System.Windows.Forms.PictureBox();
this.pictureBox5 = new System.Windows.Forms.PictureBox();
((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.Size = new System.Drawing.Size(80, 23);
this.label1.TabIndex = 0;
this.label1.Text = "姓名";
//
// label2
//
this.label2.Location = new System.Drawing.Point(48, 56);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 23);
this.label2.TabIndex = 1;
this.label2.Text = "登錄名";
//
// label3
//
this.label3.Location = new System.Drawing.Point(48, 104);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(80, 23);
this.label3.TabIndex = 2;
this.label3.Text = "密碼";
//
// label4
//
this.label4.Location = new System.Drawing.Point(48, 152);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(80, 23);
this.label4.TabIndex = 3;
this.label4.Text = "電子郵件";
//
// label5
//
this.label5.Location = new System.Drawing.Point(48, 200);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(80, 23);
this.label5.TabIndex = 4;
this.label5.Text = "基本薪資";
//
// label7
//
this.label7.Location = new System.Drawing.Point(48, 288);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 23);
this.label7.TabIndex = 6;
this.label7.Text = "職位";
//
// label8
//
this.label8.Location = new System.Drawing.Point(328, 296);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(48, 23);
this.label8.TabIndex = 7;
this.label8.Text = "電話";
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(144, 8);
this.txtName.Name = "txtName";
this.txtName.TabIndex = 10;
this.txtName.Text = "";
//
// txtUserName
//
this.txtUserName.Location = new System.Drawing.Point(144, 56);
this.txtUserName.Name = "txtUserName";
this.txtUserName.TabIndex = 11;
this.txtUserName.Text = "";
//
// txtPassword
//
this.txtPassword.Location = new System.Drawing.Point(144, 104);
this.txtPassword.Name = "txtPassword";
this.txtPassword.TabIndex = 12;
this.txtPassword.Text = "";
//
// txtEmail
//
this.txtEmail.Location = new System.Drawing.Point(144, 144);
this.txtEmail.Name = "txtEmail";
this.txtEmail.TabIndex = 13;
this.txtEmail.Text = "";
//
// txtBaseSalary
//
this.txtBaseSalary.Location = new System.Drawing.Point(144, 192);
this.txtBaseSalary.Name = "txtBaseSalary";
this.txtBaseSalary.TabIndex = 14;
this.txtBaseSalary.Text = "";
//
// txtPos
//
this.txtPos.Location = new System.Drawing.Point(144, 296);
this.txtPos.Name = "txtPos";
this.txtPos.TabIndex = 15;
this.txtPos.Text = "";
//
// txtTel
//
this.txtTel.Location = new System.Drawing.Point(392, 296);
this.txtTel.Name = "txtTel";
this.txtTel.TabIndex = 16;
this.txtTel.Text = "";
//
// numLevel
//
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -