📄 fakaframe.cs
字号:
#region 命名空间...
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
#endregion
namespace WindowsApplication
{
#region Main Class
public class FaKaFrame : System.Windows.Forms.Form
{
#region 控件声明...
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label LabelTitle;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
public System.Windows.Forms.GroupBox groupBuKa;
public System.Windows.Forms.TextBox textBuName;
public System.Windows.Forms.TextBox textBuHao;
protected System.Windows.Forms.GroupBox groupFaKa;
public System.Windows.Forms.TextBox textFaName;
public System.Windows.Forms.TextBox textFaHao;
public System.Windows.Forms.CheckBox buCheckBox;
public System.Windows.Forms.CheckBox FaCheckBox;
public System.Windows.Forms.Button btnOk;
public System.Windows.Forms.Button btnCancel;
public System.Windows.Forms.ComboBox empIDBu;
public System.Windows.Forms.ComboBox empIDFa;
private System.ComponentModel.IContainer components;
#endregion
#region 数据库变量...
private DataSet dsEmployeeIDSet=new DataSet(),dsEmployeeSet=new DataSet();//定义数据集...
private DataTable dsEmpoyeeIDTable=new DataTable(),dsEmployeeTable=new DataTable();//职工号数据集...
private DataSet dsCMOSSet=new DataSet();
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label6;
public System.Windows.Forms.Button btnReadClipID;
public System.Windows.Forms.Button btnRemoveID;
private System.Windows.Forms.ToolTip tool;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlConnection sqlConnection;
private WindowsApplication.BrushIDFrameSet brushIDFrameSet;//卡号数据集...
private DataTable dsCMOSTable=new DataTable();//卡号数据表...
#endregion
#region 构造函数
public FaKaFrame()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region 变量声明...
public string strEmployeeID="select distinct 职工号 from Employee ",strEmployeeTableName="Employee";
private string InsertCMOS_ChipSql="";
private ConnectionData conn=new ConnectionData();
public static string strBuKa="";
public static string strKaHao="";
public static string strBuEmpID="";
#endregion
#region Windows 窗体设计器生成的代码...
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(FaKaFrame));
this.groupBuKa = new System.Windows.Forms.GroupBox();
this.FaCheckBox = new System.Windows.Forms.CheckBox();
this.buCheckBox = new System.Windows.Forms.CheckBox();
this.empIDBu = new System.Windows.Forms.ComboBox();
this.textBuName = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBuHao = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.LabelTitle = new System.Windows.Forms.Label();
this.groupFaKa = new System.Windows.Forms.GroupBox();
this.empIDFa = new System.Windows.Forms.ComboBox();
this.textFaName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.textFaHao = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOk = new System.Windows.Forms.Button();
this.btnRemoveID = new System.Windows.Forms.Button();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label6 = new System.Windows.Forms.Label();
this.btnReadClipID = new System.Windows.Forms.Button();
this.tool = new System.Windows.Forms.ToolTip(this.components);
this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection = new System.Data.SqlClient.SqlConnection();
this.brushIDFrameSet = new WindowsApplication.BrushIDFrameSet();
this.groupBuKa.SuspendLayout();
this.groupFaKa.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.brushIDFrameSet)).BeginInit();
this.SuspendLayout();
//
// groupBuKa
//
this.groupBuKa.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.groupBuKa.Controls.Add(this.FaCheckBox);
this.groupBuKa.Controls.Add(this.buCheckBox);
this.groupBuKa.Controls.Add(this.empIDBu);
this.groupBuKa.Controls.Add(this.textBuName);
this.groupBuKa.Controls.Add(this.label2);
this.groupBuKa.Controls.Add(this.textBuHao);
this.groupBuKa.Controls.Add(this.label1);
this.groupBuKa.Controls.Add(this.LabelTitle);
this.groupBuKa.Location = new System.Drawing.Point(16, 64);
this.groupBuKa.Name = "groupBuKa";
this.groupBuKa.Size = new System.Drawing.Size(264, 216);
this.groupBuKa.TabIndex = 7;
this.groupBuKa.TabStop = false;
this.groupBuKa.Text = "补卡";
//
// FaCheckBox
//
this.FaCheckBox.Cursor = System.Windows.Forms.Cursors.Hand;
this.FaCheckBox.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.FaCheckBox.Location = new System.Drawing.Point(160, 176);
this.FaCheckBox.Name = "FaCheckBox";
this.FaCheckBox.Size = new System.Drawing.Size(64, 24);
this.FaCheckBox.TabIndex = 14;
this.FaCheckBox.Text = "有卡";
this.FaCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.tool.SetToolTip(this.FaCheckBox, "此处将来有个判断");
//
// buCheckBox
//
this.buCheckBox.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.buCheckBox.Location = new System.Drawing.Point(32, 176);
this.buCheckBox.Name = "buCheckBox";
this.buCheckBox.Size = new System.Drawing.Size(64, 24);
this.buCheckBox.TabIndex = 13;
this.buCheckBox.Text = "补卡";
this.buCheckBox.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.tool.SetToolTip(this.buCheckBox, "此处将来有个判断");
//
// empIDBu
//
this.empIDBu.Cursor = System.Windows.Forms.Cursors.Hand;
this.empIDBu.Location = new System.Drawing.Point(112, 29);
this.empIDBu.Name = "empIDBu";
this.empIDBu.Size = new System.Drawing.Size(121, 20);
this.empIDBu.TabIndex = 12;
this.empIDBu.SelectedIndexChanged += new System.EventHandler(this.empIDBu_SelectedIndexChanged);
//
// textBuName
//
this.textBuName.Location = new System.Drawing.Point(112, 125);
this.textBuName.Name = "textBuName";
this.textBuName.Size = new System.Drawing.Size(120, 21);
this.textBuName.TabIndex = 11;
this.textBuName.Text = "";
//
// label2
//
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label2.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(8, 125);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(88, 23);
this.label2.TabIndex = 10;
this.label2.Text = "姓名:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// textBuHao
//
this.textBuHao.Location = new System.Drawing.Point(112, 77);
this.textBuHao.Name = "textBuHao";
this.textBuHao.Size = new System.Drawing.Size(120, 21);
this.textBuHao.TabIndex = 9;
this.textBuHao.Text = "";
//
// label1
//
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(8, 77);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(88, 23);
this.label1.TabIndex = 8;
this.label1.Text = "ID卡号:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// LabelTitle
//
this.LabelTitle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.LabelTitle.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.LabelTitle.Location = new System.Drawing.Point(8, 29);
this.LabelTitle.Name = "LabelTitle";
this.LabelTitle.Size = new System.Drawing.Size(88, 23);
this.LabelTitle.TabIndex = 7;
this.LabelTitle.Text = "职工号:";
this.LabelTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// groupFaKa
//
this.groupFaKa.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.groupFaKa.Controls.Add(this.empIDFa);
this.groupFaKa.Controls.Add(this.textFaName);
this.groupFaKa.Controls.Add(this.label3);
this.groupFaKa.Controls.Add(this.textFaHao);
this.groupFaKa.Controls.Add(this.label4);
this.groupFaKa.Controls.Add(this.label5);
this.groupFaKa.Location = new System.Drawing.Point(296, 64);
this.groupFaKa.Name = "groupFaKa";
this.groupFaKa.Size = new System.Drawing.Size(320, 168);
this.groupFaKa.TabIndex = 13;
this.groupFaKa.TabStop = false;
this.groupFaKa.Text = "发卡";
//
// empIDFa
//
this.empIDFa.Location = new System.Drawing.Point(112, 32);
this.empIDFa.Name = "empIDFa";
this.empIDFa.Size = new System.Drawing.Size(121, 20);
this.empIDFa.TabIndex = 13;
this.empIDFa.KeyDown += new System.Windows.Forms.KeyEventHandler(this.empIDFa_KeyDown);
this.empIDFa.SelectedValueChanged += new System.EventHandler(this.empIDFa_SelectedValueChanged);
this.empIDFa.SelectedIndexChanged += new System.EventHandler(this.empIDFa_SelectedIndexChanged);
//
// textFaName
//
this.textFaName.Location = new System.Drawing.Point(112, 125);
this.textFaName.Name = "textFaName";
this.textFaName.Size = new System.Drawing.Size(120, 21);
this.textFaName.TabIndex = 11;
this.textFaName.Text = "";
//
// label3
//
this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label3.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.Location = new System.Drawing.Point(8, 125);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(88, 23);
this.label3.TabIndex = 10;
this.label3.Text = "姓名:";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -