?? wagesinfoform.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.OleDb;
using System.Text;
using System.IO;
using System.Drawing.Printing;
namespace PM
{
/// <summary>
/// TitleInfoForm 的摘要說明。
/// </summary>
public class WagesInfoForm : System.Windows.Forms.Form
{
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.Windows.Forms.ToolBarButton toolBarButton5;
private System.Windows.Forms.ToolBarButton toolBarButton6;
private System.Windows.Forms.ToolBarButton toolBarButton7;
private System.Windows.Forms.ToolBarButton toolBarButton8;
private System.Windows.Forms.ToolBarButton toolBarButton9;
private System.Windows.Forms.ToolBarButton toolBarButton10;
private System.Windows.Forms.ToolBarButton toolBarButton11;
private System.Windows.Forms.ToolBarButton toolBarButton12;
private System.Windows.Forms.ToolBarButton toolBarButton13;
private System.Windows.Forms.ToolBarButton toolBarButton14;
private System.Windows.Forms.ToolBarButton toolBarButton15;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.ContextMenu contextMenu1;
public System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox ID_txt;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox name_txt;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Drawing.Printing.PrintDocument printDocument1;
private System.Windows.Forms.PageSetupDialog pageSetupDialog1;
private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
private System.Windows.Forms.PrintDialog printDialog1;
private CurrencyManager cm;
public StringBuilder sb = new StringBuilder();
public static string wwID = string.Empty;
public DataTable dt = new DataTable();
private System.Windows.Forms.ContextMenu contextMenu2;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.TextBox Date_txt;
public static WagesInfoForm wiff ;
public WagesInfoForm()
{
//
// Windows 窗體設計器支持所必需的
//
InitializeComponent();
wiff = this;
//
// 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()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WagesInfoForm));
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton9 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton5 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton7 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton10 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton11 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton12 = new System.Windows.Forms.ToolBarButton();
this.contextMenu2 = new System.Windows.Forms.ContextMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.toolBarButton14 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton13 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton15 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton8 = new System.Windows.Forms.ToolBarButton();
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.dataGrid1 = new System.Windows.Forms.DataGrid();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button1 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.name_txt = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.ID_txt = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.printDialog1 = new System.Windows.Forms.PrintDialog();
this.Date_txt = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// 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;
//
// toolBar1
//
this.toolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
this.toolBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton2,
this.toolBarButton3,
this.toolBarButton4,
this.toolBarButton9,
this.toolBarButton5,
this.toolBarButton6,
this.toolBarButton7,
this.toolBarButton10,
this.toolBarButton11,
this.toolBarButton12,
this.toolBarButton14,
this.toolBarButton13,
this.toolBarButton15,
this.toolBarButton8});
this.toolBar1.DropDownArrows = true;
this.toolBar1.ImageList = this.imageList1;
this.toolBar1.Location = new System.Drawing.Point(0, 0);
this.toolBar1.Name = "toolBar1";
this.toolBar1.ShowToolTips = true;
this.toolBar1.Size = new System.Drawing.Size(920, 29);
this.toolBar1.TabIndex = 0;
this.toolBar1.TextAlign = System.Windows.Forms.ToolBarTextAlign.Right;
this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
//
// toolBarButton1
//
this.toolBarButton1.ImageIndex = 0;
this.toolBarButton1.Text = "首記錄";
this.toolBarButton1.ToolTipText = "首記錄";
//
// toolBarButton2
//
this.toolBarButton2.ImageIndex = 1;
this.toolBarButton2.Text = "上記錄";
this.toolBarButton2.ToolTipText = "上記錄";
//
// toolBarButton3
//
this.toolBarButton3.ImageIndex = 2;
this.toolBarButton3.Text = "下記錄";
this.toolBarButton3.ToolTipText = "下記錄";
//
// toolBarButton4
//
this.toolBarButton4.ImageIndex = 3;
this.toolBarButton4.Text = "尾記錄";
this.toolBarButton4.ToolTipText = "尾記錄";
//
// toolBarButton9
//
this.toolBarButton9.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButton5
//
this.toolBarButton5.ImageIndex = 4;
this.toolBarButton5.Text = "添加";
this.toolBarButton5.ToolTipText = "添加";
//
// toolBarButton6
//
this.toolBarButton6.ImageIndex = 5;
this.toolBarButton6.Text = "修改";
this.toolBarButton6.ToolTipText = "修改";
//
// toolBarButton7
//
this.toolBarButton7.ImageIndex = 6;
this.toolBarButton7.Text = "刪除";
this.toolBarButton7.ToolTipText = "刪除";
//
// toolBarButton10
//
this.toolBarButton10.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButton11
//
this.toolBarButton11.ImageIndex = 7;
this.toolBarButton11.Text = "查找";
this.toolBarButton11.ToolTipText = "查找";
//
// toolBarButton12
//
this.toolBarButton12.DropDownMenu = this.contextMenu2;
this.toolBarButton12.ImageIndex = 8;
this.toolBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
this.toolBarButton12.Text = "打印";
this.toolBarButton12.ToolTipText = "打印";
//
// contextMenu2
//
this.contextMenu2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem2,
this.menuItem3});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.Text = "頁面設置";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.Text = "打印預覽";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 2;
this.menuItem3.Text = "打印";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// toolBarButton14
//
this.toolBarButton14.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButton13
//
this.toolBarButton13.ImageIndex = 9;
this.toolBarButton13.Text = "列選擇";
this.toolBarButton13.ToolTipText = "列選擇";
//
// toolBarButton15
//
this.toolBarButton15.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// toolBarButton8
//
this.toolBarButton8.ImageIndex = 10;
this.toolBarButton8.Text = "退出";
this.toolBarButton8.ToolTipText = "退出";
//
// contextMenu1
//
this.contextMenu1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.contextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup);
//
// dataGrid1
//
this.dataGrid1.ContextMenu = this.contextMenu1;
this.dataGrid1.DataMember = "";
this.dataGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
this.dataGrid1.Location = new System.Drawing.Point(0, 29);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(920, 424);
this.dataGrid1.TabIndex = 1;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.Date_txt);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.name_txt);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.ID_txt);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Location = new System.Drawing.Point(8, 32);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(904, 56);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "查找記錄";
this.groupBox1.Visible = false;
//
// button1
//
this.button1.Location = new System.Drawing.Point(680, 16);
this.button1.Name = "button1";
this.button1.TabIndex = 6;
this.button1.Text = "查找記錄";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label3
//
this.label3.Location = new System.Drawing.Point(472, 24);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 16);
this.label3.TabIndex = 4;
this.label3.Text = "發放時間";
//
// name_txt
//
this.name_txt.Location = new System.Drawing.Point(312, 16);
this.name_txt.Name = "name_txt";
this.name_txt.TabIndex = 3;
this.name_txt.Text = "";
this.name_txt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.name_txt_KeyPress);
//
// label2
//
this.label2.Location = new System.Drawing.Point(248, 24);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 16);
this.label2.TabIndex = 2;
this.label2.Text = "員工姓名";
//
// ID_txt
//
this.ID_txt.Location = new System.Drawing.Point(96, 16);
this.ID_txt.Name = "ID_txt";
this.ID_txt.TabIndex = 1;
this.ID_txt.Text = "";
this.ID_txt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ID_txt_KeyPress);
this.ID_txt.TextChanged += new System.EventHandler(this.ID_txt_TextChanged);
//
// label1
//
this.label1.Location = new System.Drawing.Point(32, 24);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 16);
this.label1.TabIndex = 0;
this.label1.Text = "員工編號";
//
// button2
//
this.button2.Location = new System.Drawing.Point(792, 16);
this.button2.Name = "button2";
this.button2.TabIndex = 6;
this.button2.Text = "取消";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// printDocument1
//
this.printDocument1.OriginAtMargins = true;
this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
//
// pageSetupDialog1
//
this.pageSetupDialog1.Document = this.printDocument1;
this.pageSetupDialog1.ShowHelp = true;
//
// printPreviewDialog1
//
this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
this.printPreviewDialog1.Document = this.printDocument1;
this.printPreviewDialog1.Enabled = true;
this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
this.printPreviewDialog1.Location = new System.Drawing.Point(406, 16);
this.printPreviewDialog1.MinimumSize = new System.Drawing.Size(375, 250);
this.printPreviewDialog1.Name = "printPreviewDialog1";
this.printPreviewDialog1.TransparencyKey = System.Drawing.Color.Empty;
this.printPreviewDialog1.UseAntiAlias = true;
this.printPreviewDialog1.Visible = false;
this.printPreviewDialog1.Closed += new System.EventHandler(this.printPreviewDialog1_Closed);
//
// printDialog1
//
this.printDialog1.AllowSelection = true;
this.printDialog1.AllowSomePages = true;
this.printDialog1.Document = this.printDocument1;
this.printDialog1.ShowHelp = true;
//
// Date_txt
//
this.Date_txt.Location = new System.Drawing.Point(544, 16);
this.Date_txt.Name = "Date_txt";
this.Date_txt.TabIndex = 7;
this.Date_txt.Text = "";
this.Date_txt.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Date_txt_KeyPress);
//
// WagesInfoForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(920, 453);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.dataGrid1);
this.Controls.Add(this.toolBar1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "WagesInfoForm";
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -