employeebrushframehistory.cs
来自「独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 」· CS 代码 · 共 875 行 · 第 1/3 页
CS
875 行
this.tDelteFirst,
this.toolBarButton1,
this.tExit});
this.tool.ButtonSize = new System.Drawing.Size(80, 40);
this.tool.DropDownArrows = true;
this.tool.ImageList = this.imageList1;
this.tool.Location = new System.Drawing.Point(0, 0);
this.tool.Name = "tool";
this.tool.ShowToolTips = true;
this.tool.Size = new System.Drawing.Size(728, 41);
this.tool.TabIndex = 11;
this.tool.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tool_ButtonClick);
//
// tLast
//
this.tLast.ImageIndex = 2;
this.tLast.Text = "上一条记录";
//
// toolBarButton2
//
this.toolBarButton2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tFirst
//
this.tFirst.ImageIndex = 3;
this.tFirst.Text = "首记录";
//
// toolBarButton4
//
this.toolBarButton4.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tNext
//
this.tNext.ImageIndex = 4;
this.tNext.Text = "下一条记录";
//
// toolBarButton6
//
this.toolBarButton6.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tEnd
//
this.tEnd.ImageIndex = 5;
this.tEnd.Text = "尾记录";
//
// toolBarButton8
//
this.toolBarButton8.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tDelete
//
this.tDelete.ImageIndex = 7;
this.tDelete.Text = "删除历史";
//
// toolBarButton10
//
this.toolBarButton10.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tDelteFirst
//
this.tDelteFirst.ImageIndex = 8;
this.tDelteFirst.Text = "删除";
//
// toolBarButton1
//
this.toolBarButton1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tExit
//
this.tExit.ImageIndex = 9;
this.tExit.Text = "退出";
//
// backLabel
//
this.backLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.backLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.backLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.backLabel.Location = new System.Drawing.Point(0, 80);
this.backLabel.Name = "backLabel";
this.backLabel.Size = new System.Drawing.Size(728, 56);
this.backLabel.TabIndex = 12;
this.backLabel.Text = "label2";
//
// BrushIDComBoBox
//
this.BrushIDComBoBox.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.BrushIDComBoBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
this.BrushIDComBoBox.ForeColor = System.Drawing.Color.White;
this.BrushIDComBoBox.Location = new System.Drawing.Point(488, 96);
this.BrushIDComBoBox.Name = "BrushIDComBoBox";
this.BrushIDComBoBox.Size = new System.Drawing.Size(112, 20);
this.BrushIDComBoBox.Sorted = true;
this.BrushIDComBoBox.TabIndex = 14;
this.BrushIDComBoBox.MouseEnter += new System.EventHandler(this.BrushIDComBoBox_MouseEnter);
this.BrushIDComBoBox.MouseLeave += new System.EventHandler(this.BrushIDComBoBox_MouseLeave);
//
// label2
//
this.label2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label2.ForeColor = System.Drawing.Color.White;
this.label2.Location = new System.Drawing.Point(408, 96);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(64, 23);
this.label2.TabIndex = 13;
this.label2.Text = "卡号:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// UserLabel
//
this.UserLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.UserLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.UserLabel.ForeColor = System.Drawing.Color.White;
this.UserLabel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.UserLabel.ImageIndex = 10;
this.UserLabel.ImageList = this.imageList1;
this.UserLabel.Location = new System.Drawing.Point(8, 472);
this.UserLabel.Name = "UserLabel";
this.UserLabel.Size = new System.Drawing.Size(104, 23);
this.UserLabel.TabIndex = 15;
this.UserLabel.Text = "当前用户:";
this.UserLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CurrentDate
//
this.CurrentDate.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.CurrentDate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CurrentDate.ForeColor = System.Drawing.Color.White;
this.CurrentDate.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.CurrentDate.ImageIndex = 8;
this.CurrentDate.ImageList = this.imageList1;
this.CurrentDate.Location = new System.Drawing.Point(184, 472);
this.CurrentDate.Name = "CurrentDate";
this.CurrentDate.Size = new System.Drawing.Size(104, 23);
this.CurrentDate.TabIndex = 16;
this.CurrentDate.Text = "当前日期:";
this.CurrentDate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CurrentTime
//
this.CurrentTime.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.CurrentTime.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CurrentTime.ForeColor = System.Drawing.Color.White;
this.CurrentTime.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.CurrentTime.ImageIndex = 13;
this.CurrentTime.ImageList = this.imageList1;
this.CurrentTime.Location = new System.Drawing.Point(352, 472);
this.CurrentTime.Name = "CurrentTime";
this.CurrentTime.Size = new System.Drawing.Size(104, 23);
this.CurrentTime.TabIndex = 17;
this.CurrentTime.Text = "当前时间:";
this.CurrentTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// CurrentReturn
//
this.CurrentReturn.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.CurrentReturn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CurrentReturn.ForeColor = System.Drawing.Color.White;
this.CurrentReturn.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.CurrentReturn.ImageIndex = 14;
this.CurrentReturn.ImageList = this.imageList1;
this.CurrentReturn.Location = new System.Drawing.Point(536, 472);
this.CurrentReturn.Name = "CurrentReturn";
this.CurrentReturn.Size = new System.Drawing.Size(104, 23);
this.CurrentReturn.TabIndex = 18;
this.CurrentReturn.Text = "所有记录:";
this.CurrentReturn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// userText
//
this.userText.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.userText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.userText.ForeColor = System.Drawing.Color.White;
this.userText.Location = new System.Drawing.Point(96, 472);
this.userText.Name = "userText";
this.userText.Size = new System.Drawing.Size(80, 23);
this.userText.TabIndex = 19;
this.userText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// TimeText
//
this.TimeText.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.TimeText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.TimeText.ForeColor = System.Drawing.Color.White;
this.TimeText.Location = new System.Drawing.Point(432, 472);
this.TimeText.Name = "TimeText";
this.TimeText.Size = new System.Drawing.Size(104, 23);
this.TimeText.TabIndex = 21;
this.TimeText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// AllText
//
this.AllText.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.AllText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.AllText.ForeColor = System.Drawing.Color.White;
this.AllText.Location = new System.Drawing.Point(616, 472);
this.AllText.Name = "AllText";
this.AllText.Size = new System.Drawing.Size(104, 23);
this.AllText.TabIndex = 22;
this.AllText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// sqlDataAdapter
//
this.sqlDataAdapter.DeleteCommand = this.sqlDeleteCommand1;
this.sqlDataAdapter.InsertCommand = this.sqlInsertCommand1;
this.sqlDataAdapter.SelectCommand = this.sqlSelectCommand1;
this.sqlDataAdapter.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "BrushIDHistory", new System.Data.Common.DataColumnMapping[] {
new System.Data.Common.DataColumnMapping("编号", "编号"),
new System.Data.Common.DataColumnMapping("日期", "日期"),
new System.Data.Common.DataColumnMapping("时间", "时间"),
new System.Data.Common.DataColumnMapping("卡号", "卡号"),
new System.Data.Common.DataColumnMapping("职工名称", "职工名称"),
new System.Data.Common.DataColumnMapping("状态", "状态")})});
this.sqlDataAdapter.UpdateCommand = this.sqlUpdateCommand1;
//
// sqlDeleteCommand1
//
this.sqlDeleteCommand1.CommandText = @"DELETE FROM BrushIDHistory WHERE (编号 = @Original_编号) AND (卡号 = @Original_卡号 OR @Original_卡号 IS NULL AND 卡号 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND 日期 IS NULL) AND (时间 = @Original_时间 OR @Original_时间 IS NULL AND 时间 IS NULL) AND (状态 = @Original_状态 OR @Original_状态 IS NULL AND 状态 IS NULL) AND (职工名称 = @Original_职工名称 OR @Original_职工名称 IS NULL AND 职工名称 IS NULL)";
this.sqlDeleteCommand1.Connection = this.sqlConnection;
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_编号", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_卡号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "卡号", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_时间", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "时间", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "状态", System.Data.DataRowVersion.Original, null));
this.sqlDeleteCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职工名称", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职工名称", System.Data.DataRowVersion.Original, null));
//
// sqlConnection
//
this.sqlConnection.ConnectionString = "workstation id=localhost;integrated security=SSPI;database=SystemODBC";
//
// sqlInsertCommand1
//
this.sqlInsertCommand1.CommandText = "INSERT INTO BrushIDHistory(日期, 时间, 卡号, 职工名称, 状态) VALUES (@日期, @时间, @卡号, @职工名称, @状" +
"态); SELECT 编号, 日期, 时间, 卡号, 职工名称, 状态 FROM BrushIDHistory WHERE (编号 = @@IDENTITY)";
this.sqlInsertCommand1.Connection = this.sqlConnection;
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.DateTime, 8, "日期"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@时间", System.Data.SqlDbType.VarChar, 50, "时间"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@卡号", System.Data.SqlDbType.VarChar, 50, "卡号"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职工名称", System.Data.SqlDbType.VarChar, 50, "职工名称"));
this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 10, "状态"));
//
// sqlSelectCommand1
//
this.sqlSelectCommand1.CommandText = "SELECT 编号, 日期, 时间, 卡号, 职工名称, 状态 FROM BrushIDHistory";
this.sqlSelectCommand1.Connection = this.sqlConnection;
//
// sqlUpdateCommand1
//
this.sqlUpdateCommand1.CommandText = @"UPDATE BrushIDHistory SET 日期 = @日期, 时间 = @时间, 卡号 = @卡号, 职工名称 = @职工名称, 状态 = @状态 WHERE (编号 = @Original_编号) AND (卡号 = @Original_卡号 OR @Original_卡号 IS NULL AND 卡号 IS NULL) AND (日期 = @Original_日期 OR @Original_日期 IS NULL AND 日期 IS NULL) AND (时间 = @Original_时间 OR @Original_时间 IS NULL AND 时间 IS NULL) AND (状态 = @Original_状态 OR @Original_状态 IS NULL AND 状态 IS NULL) AND (职工名称 = @Original_职工名称 OR @Original_职工名称 IS NULL AND 职工名称 IS NULL); SELECT 编号, 日期, 时间, 卡号, 职工名称, 状态 FROM BrushIDHistory WHERE (编号 = @编号)";
this.sqlUpdateCommand1.Connection = this.sqlConnection;
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@日期", System.Data.SqlDbType.DateTime, 8, "日期"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@时间", System.Data.SqlDbType.VarChar, 50, "时间"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@卡号", System.Data.SqlDbType.VarChar, 50, "卡号"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@职工名称", System.Data.SqlDbType.VarChar, 50, "职工名称"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@状态", System.Data.SqlDbType.VarChar, 10, "状态"));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_编号", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "编号", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_卡号", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "卡号", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_日期", System.Data.SqlDbType.DateTime, 8, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "日期", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_时间", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "时间", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_状态", System.Data.SqlDbType.VarChar, 10, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "状态", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_职工名称", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "职工名称", System.Data.DataRowVersion.Original, null));
this.sqlUpdateCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@编号", System.Data.SqlDbType.Int, 4, "编号"));
//
// brushIDSet
//
this.brushIDSet.DataSetName = "BrushIDSet";
this.brushIDSet.Locale = new System.Globalization.CultureInfo("zh-CN");
//
// DateText
//
this.DateText.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.DateText.Cursor = System.Windows.Forms.Cursors.Hand;
this.DateText.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.DateText.ForeColor = System.Drawing.Color.White;
this.DateText.Location = new System.Drawing.Point(264, 472);
this.DateText.Name = "DateText";
this.DateText.Size = new System.Drawing.Size(88, 23);
this.DateText.TabIndex = 20;
this.DateText.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// currentTimer
//
this.currentTimer.Enabled = true;
this.currentTimer.Interval = 1000;
this.currentTimer.Tick += new System.EventHandler(this.currentTimer_Tick);
//
// sqlDataAdapter1
//
this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand2;
this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table", "BrushIDHistory", new System.Data.Common.DataColumnMapping[] {
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?