📄 employeebrushframehistory.cs
字号:
#region named place....
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.History
{
public class EmployeeBrushFrameHistory : System.Windows.Forms.Form
{
#region Control...
private System.Windows.Forms.Label TitleLabel;
private System.Windows.Forms.Label StausLabel;
private System.Windows.Forms.ComboBox Emp_Name;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox DateComboBox;
private System.Windows.Forms.Label dateLabel;
private System.Windows.Forms.DataGrid dataGrid;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBar tool;
private System.Windows.Forms.ToolBarButton tLast;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton tFirst;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.Windows.Forms.ToolBarButton tNext;
private System.Windows.Forms.ToolBarButton toolBarButton6;
private System.Windows.Forms.ToolBarButton tEnd;
private System.Windows.Forms.ToolBarButton toolBarButton8;
private System.Windows.Forms.ToolBarButton tDelete;
private System.Windows.Forms.ToolBarButton toolBarButton10;
private System.Windows.Forms.ToolBarButton tDelteFirst;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton tExit;
private System.Windows.Forms.Label backLabel;
private System.Windows.Forms.ComboBox BrushIDComBoBox;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.Label UserLabel;
private System.Windows.Forms.Label CurrentDate;
private System.Windows.Forms.Label CurrentTime;
private System.Windows.Forms.Label CurrentReturn;
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter;
private System.Data.SqlClient.SqlConnection sqlConnection;
private WindowsApplication.History.BrushIDSet brushIDSet;
private DataSet ds=new DataSet();
private System.Windows.Forms.CurrencyManager cmOrders=null;
private System.Windows.Forms.Label userText;
private System.Windows.Forms.Label TimeText;
private System.Windows.Forms.Label AllText;
private System.Windows.Forms.Label DateText;
private System.Windows.Forms.Timer currentTimer;
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.SqlDataAdapter sqlDataAdapter1;
private System.Data.SqlClient.SqlCommand sqlSelectCommand2;
private System.Data.SqlClient.SqlConnection sqlConnection1;
private System.ComponentModel.IContainer components;
#endregion
#region Function...
public EmployeeBrushFrameHistory()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(EmployeeBrushFrameHistory));
this.TitleLabel = new System.Windows.Forms.Label();
this.StausLabel = new System.Windows.Forms.Label();
this.Emp_Name = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.DateComboBox = new System.Windows.Forms.ComboBox();
this.dateLabel = new System.Windows.Forms.Label();
this.btnSearch = new System.Windows.Forms.Button();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.dataGrid = new System.Windows.Forms.DataGrid();
this.tool = new System.Windows.Forms.ToolBar();
this.tLast = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.tFirst = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.tNext = new System.Windows.Forms.ToolBarButton();
this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
this.tEnd = new System.Windows.Forms.ToolBarButton();
this.toolBarButton8 = new System.Windows.Forms.ToolBarButton();
this.tDelete = new System.Windows.Forms.ToolBarButton();
this.toolBarButton10 = new System.Windows.Forms.ToolBarButton();
this.tDelteFirst = new System.Windows.Forms.ToolBarButton();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.tExit = new System.Windows.Forms.ToolBarButton();
this.backLabel = new System.Windows.Forms.Label();
this.BrushIDComBoBox = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.UserLabel = new System.Windows.Forms.Label();
this.CurrentDate = new System.Windows.Forms.Label();
this.CurrentTime = new System.Windows.Forms.Label();
this.CurrentReturn = new System.Windows.Forms.Label();
this.userText = new System.Windows.Forms.Label();
this.TimeText = new System.Windows.Forms.Label();
this.AllText = new System.Windows.Forms.Label();
this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
this.brushIDSet = new WindowsApplication.History.BrushIDSet();
this.DateText = new System.Windows.Forms.Label();
this.currentTimer = new System.Windows.Forms.Timer(this.components);
this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
this.sqlSelectCommand2 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
((System.ComponentModel.ISupportInitialize)(this.dataGrid)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.brushIDSet)).BeginInit();
this.SuspendLayout();
//
// TitleLabel
//
this.TitleLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TitleLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.TitleLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.TitleLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.TitleLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.TitleLabel.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.TitleLabel.ForeColor = System.Drawing.Color.White;
this.TitleLabel.Location = new System.Drawing.Point(0, 40);
this.TitleLabel.Name = "TitleLabel";
this.TitleLabel.Size = new System.Drawing.Size(734, 40);
this.TitleLabel.TabIndex = 0;
this.TitleLabel.Text = "职工刷卡历史";
this.TitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// StausLabel
//
this.StausLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.StausLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.StausLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.StausLabel.Location = new System.Drawing.Point(0, 464);
this.StausLabel.Name = "StausLabel";
this.StausLabel.Size = new System.Drawing.Size(734, 40);
this.StausLabel.TabIndex = 1;
this.StausLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// Emp_Name
//
this.Emp_Name.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.Emp_Name.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
this.Emp_Name.ForeColor = System.Drawing.Color.White;
this.Emp_Name.Location = new System.Drawing.Point(104, 96);
this.Emp_Name.Name = "Emp_Name";
this.Emp_Name.Size = new System.Drawing.Size(104, 20);
this.Emp_Name.Sorted = true;
this.Emp_Name.TabIndex = 6;
this.Emp_Name.MouseEnter += new System.EventHandler(this.BrushIDComBoBox_MouseEnter);
this.Emp_Name.MouseLeave += new System.EventHandler(this.BrushIDComBoBox_MouseLeave);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.label1.ForeColor = System.Drawing.Color.White;
this.label1.Location = new System.Drawing.Point(32, 96);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(64, 23);
this.label1.TabIndex = 5;
this.label1.Text = "职工名称:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// DateComboBox
//
this.DateComboBox.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.DateComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple;
this.DateComboBox.ForeColor = System.Drawing.Color.White;
this.DateComboBox.Location = new System.Drawing.Point(288, 96);
this.DateComboBox.Name = "DateComboBox";
this.DateComboBox.Size = new System.Drawing.Size(112, 20);
this.DateComboBox.Sorted = true;
this.DateComboBox.TabIndex = 8;
this.DateComboBox.MouseEnter += new System.EventHandler(this.BrushIDComBoBox_MouseEnter);
this.DateComboBox.MouseLeave += new System.EventHandler(this.BrushIDComBoBox_MouseLeave);
//
// dateLabel
//
this.dateLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.dateLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.dateLabel.ForeColor = System.Drawing.Color.White;
this.dateLabel.Location = new System.Drawing.Point(216, 96);
this.dateLabel.Name = "dateLabel";
this.dateLabel.Size = new System.Drawing.Size(64, 23);
this.dateLabel.TabIndex = 7;
this.dateLabel.Text = "日期:";
this.dateLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.ForeColor = System.Drawing.Color.White;
this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnSearch.ImageIndex = 1;
this.btnSearch.ImageList = this.imageList1;
this.btnSearch.Location = new System.Drawing.Point(624, 96);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(80, 24);
this.btnSearch.TabIndex = 9;
this.btnSearch.Text = "查询(&S)";
this.btnSearch.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnSearch.Click += new System.EventHandler(this.button1_Click);
//
// imageList1
//
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// dataGrid
//
this.dataGrid.AlternatingBackColor = System.Drawing.Color.GhostWhite;
this.dataGrid.BackColor = System.Drawing.Color.GhostWhite;
this.dataGrid.BackgroundColor = System.Drawing.Color.Lavender;
this.dataGrid.CaptionBackColor = System.Drawing.Color.RoyalBlue;
this.dataGrid.CaptionForeColor = System.Drawing.Color.White;
this.dataGrid.CaptionVisible = false;
this.dataGrid.DataMember = "";
this.dataGrid.FlatMode = true;
this.dataGrid.Font = new System.Drawing.Font("Tahoma", 8F);
this.dataGrid.ForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid.GridLineColor = System.Drawing.Color.RoyalBlue;
this.dataGrid.HeaderBackColor = System.Drawing.Color.MidnightBlue;
this.dataGrid.HeaderFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Bold);
this.dataGrid.HeaderForeColor = System.Drawing.Color.Lavender;
this.dataGrid.LinkColor = System.Drawing.Color.Teal;
this.dataGrid.Location = new System.Drawing.Point(0, 136);
this.dataGrid.Name = "dataGrid";
this.dataGrid.ParentRowsBackColor = System.Drawing.Color.Lavender;
this.dataGrid.ParentRowsForeColor = System.Drawing.Color.MidnightBlue;
this.dataGrid.ReadOnly = true;
this.dataGrid.SelectionBackColor = System.Drawing.Color.Teal;
this.dataGrid.SelectionForeColor = System.Drawing.Color.PaleGreen;
this.dataGrid.Size = new System.Drawing.Size(736, 328);
this.dataGrid.TabIndex = 10;
this.dataGrid.CurrentCellChanged += new System.EventHandler(this.dataGrid_CurrentCellChanged);
//
// tool
//
this.tool.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.tool.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.tLast,
this.toolBarButton2,
this.tFirst,
this.toolBarButton4,
this.tNext,
this.toolBarButton6,
this.tEnd,
this.toolBarButton8,
this.tDelete,
this.toolBarButton10,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -