📄 todayitem.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace XFMAS.Admin
{
/// <summary>
/// TodayItem 的摘要说明。
/// </summary>
public class TodayItem : System.Windows.Forms.Form
{
public System.Windows.Forms.DataGrid dataGrid1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
//打印
private ReportLibrary.ReportDocument rd = null;
public TodayItem()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// 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.dataGrid1 = new System.Windows.Forms.DataGrid();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
this.SuspendLayout();
//
// dataGrid1
//
this.dataGrid1.CaptionVisible = false;
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, 0);
this.dataGrid1.Name = "dataGrid1";
this.dataGrid1.Size = new System.Drawing.Size(504, 399);
this.dataGrid1.TabIndex = 0;
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3,
this.menuItem4});
this.menuItem1.Text = "文件(&F)";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "打印(&P)";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "-";
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "退出(&E)";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// TodayItem
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(504, 399);
this.Controls.Add(this.dataGrid1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Menu = this.mainMenu1;
this.MinimizeBox = false;
this.Name = "TodayItem";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Load += new System.EventHandler(this.TodayItem_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void TodayItem_Load(object sender, System.EventArgs e) {
}
private void menuItem4_Click(object sender, System.EventArgs e) {
this.Close();
}
private void menuItem2_Click(object sender, System.EventArgs e) {
if(!Public.CheckIsRule("R_001")) return;
this.rd = new ReportLibrary.ReportDocument(((DataTable)this.dataGrid1.DataSource));
this.rd.RestoreProperty("SystemID=0SystemName=ReportID=0ReportCode=ReportName=ReportType=ReportMemo=PageTitle="+ this.Text +"PageSubTitle=PageHeader={[\n]}PageFooter=GridPrintWhere=GridSelectStyle=GridPrintFields=GridTotalFields=GridChineseField=GridSortFields=GridPaginationFields=GridStatisticsFields=GridSumFields=GridRowToColFields=PdPropertys=PrinterName=EPSON LQ-1600KIIIPaperName=A4PaperWidth=827PaperHeight=1169PaperIsLandscape=falsePaperMargin.Left=30PaperMargin.Right=51PaperMargin.Top=51PaperMargin.Bottom=31");
this.rd.GridIsFillblank = false;
this.rd.PaperFooterIsNearGrid = true;
this.rd.PaperCols = 1;
this.rd.FontHeader = new Font("宋体",11F);
this.rd.FontGrid = new Font("宋体",11F);
this.rd.FontFooter = new Font("宋体",11F);
this.rd.FontTitle = new Font("黑体",20F,FontStyle.Bold);
this.rd.PrintPreview();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -