📄 workinfoform.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 WorkInfoForm : 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.TextBox textBox1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox Job_txt;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
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 wID = string.Empty;
public DataTable dt = new DataTable();
private System.Windows.Forms.TextBox Fstar_txt;
private System.Windows.Forms.TextBox LDate_txt;
public static WorkInfoForm wif = new WorkInfoForm();
public WorkInfoForm()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
wif = 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(WorkInfoForm));
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.contextMenu1 = 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.dataGrid1 = new System.Windows.Forms.DataGrid();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.LDate_txt = new System.Windows.Forms.TextBox();
this.Fstar_txt = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.Job_txt = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
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();
((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.contextMenu1;
this.toolBarButton12.ImageIndex = 8;
this.toolBarButton12.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
this.toolBarButton12.Text = "打印";
this.toolBarButton12.ToolTipText = "打印";
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem2,
this.menuItem3});
this.contextMenu1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.contextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup);
//
// 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 = "退出";
//
// 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.LDate_txt);
this.groupBox1.Controls.Add(this.Fstar_txt);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.Job_txt);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.textBox1);
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(16, 40);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(896, 96);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "查找记录";
this.groupBox1.Visible = false;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -