📄 newemployee.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Data;
using RemotingClass;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels;
namespace Login
{
/// <summary>
/// NewEmployee 的摘要说明。
/// </summary>
public class NewEmployee : System.Windows.Forms.Form
{
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbPhone;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button bNew;
private System.Windows.Forms.Button bExit;
private System.Windows.Forms.GroupBox gbInput;
private System.Windows.Forms.ComboBox cbGender;
private System.Windows.Forms.ComboBox cbKind;
private System.Windows.Forms.TextBox tbName;
private System.Data.SqlClient.SqlConnection sqlConnection_Staff;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter_Staff;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter_SysUser;
private System.Data.DataSet dataSet_Staff;
private System.Data.DataTable Staff;
private System.Data.DataSet dataSet_SysUser;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox cbBranch;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter_Branch;
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.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand3;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand3;
private System.Data.SqlClient.SqlCommand sqlSelectCommand3;
private System.Data.SqlClient.SqlCommand sqlInsertCommand3;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public NewEmployee()
{
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(NewEmployee));
this.label1 = new System.Windows.Forms.Label();
this.tbName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbPhone = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.bNew = new System.Windows.Forms.Button();
this.bExit = new System.Windows.Forms.Button();
this.gbInput = new System.Windows.Forms.GroupBox();
this.cbBranch = new System.Windows.Forms.ComboBox();
this.label5 = new System.Windows.Forms.Label();
this.cbKind = new System.Windows.Forms.ComboBox();
this.cbGender = new System.Windows.Forms.ComboBox();
this.sqlConnection_Staff = new System.Data.SqlClient.SqlConnection();
this.sqlDataAdapter_Staff = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDataAdapter_SysUser = new System.Data.SqlClient.SqlDataAdapter();
this.dataSet_Staff = new System.Data.DataSet();
this.Staff = new System.Data.DataTable();
this.dataSet_SysUser = new System.Data.DataSet();
this.sqlDataAdapter_Branch = 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.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand3 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.gbInput.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataSet_Staff)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.Staff)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataSet_SysUser)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(40, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 23);
this.label1.TabIndex = 1;
this.label1.Text = "姓名:";
//
// tbName
//
this.tbName.Location = new System.Drawing.Point(104, 16);
this.tbName.Name = "tbName";
this.tbName.Size = new System.Drawing.Size(120, 21);
this.tbName.TabIndex = 2;
this.tbName.Text = "";
//
// label2
//
this.label2.Location = new System.Drawing.Point(40, 64);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 16);
this.label2.TabIndex = 3;
this.label2.Text = "性别:";
//
// tbPhone
//
this.tbPhone.Location = new System.Drawing.Point(104, 136);
this.tbPhone.Name = "tbPhone";
this.tbPhone.Size = new System.Drawing.Size(120, 21);
this.tbPhone.TabIndex = 4;
this.tbPhone.Text = "";
//
// label3
//
this.label3.Location = new System.Drawing.Point(40, 104);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(64, 23);
this.label3.TabIndex = 5;
this.label3.Text = "职位:";
//
// label4
//
this.label4.Location = new System.Drawing.Point(32, 144);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(64, 16);
this.label4.TabIndex = 6;
this.label4.Text = "联系电话:";
//
// bNew
//
this.bNew.Location = new System.Drawing.Point(168, 392);
this.bNew.Name = "bNew";
this.bNew.TabIndex = 7;
this.bNew.Text = "添加";
this.bNew.Click += new System.EventHandler(this.bNew_Click);
//
// bExit
//
this.bExit.Location = new System.Drawing.Point(320, 392);
this.bExit.Name = "bExit";
this.bExit.TabIndex = 8;
this.bExit.Text = "退出";
this.bExit.Click += new System.EventHandler(this.bExit_Click);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -