⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sreportfrm.cs

📁 本代码设计了一个销售管理系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.Drawing.Printing;
using System.IO;
using UserData;

namespace LtsClient
{
	/// <summary>
	/// SReportFrm 的摘要说明。
	/// </summary>
	public class SReportFrm : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.TextBox actiontime;
		private System.Windows.Forms.Label label2;
		internal System.Windows.Forms.DataGrid dataGrid1;
		private System.Windows.Forms.Button searchbtn;
		private System.Windows.Forms.Button reportbtn;
		private System.Windows.Forms.Button delbtn;
		private System.Windows.Forms.Button hireback;
		private System.Windows.Forms.TextBox mincode;
		private System.Windows.Forms.TextBox maxcode;
		private System.Windows.Forms.Label label3;
		private System.Drawing.Printing.PrintDocument printDocument1;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public SReportFrm()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.label1 = new System.Windows.Forms.Label();
			this.actiontime = new System.Windows.Forms.TextBox();
			this.mincode = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.searchbtn = new System.Windows.Forms.Button();
			this.reportbtn = new System.Windows.Forms.Button();
			this.dataGrid1 = new System.Windows.Forms.DataGrid();
			this.delbtn = new System.Windows.Forms.Button();
			this.hireback = new System.Windows.Forms.Button();
			this.maxcode = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.printDocument1 = new System.Drawing.Printing.PrintDocument();
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 17);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(69, 17);
			this.label1.TabIndex = 0;
			this.label1.Text = "发生时间";
			// 
			// actiontime
			// 
			this.actiontime.Location = new System.Drawing.Point(70, 9);
			this.actiontime.Name = "actiontime";
			this.actiontime.Size = new System.Drawing.Size(97, 21);
			this.actiontime.TabIndex = 1;
			this.actiontime.Text = "";
			// 
			// mincode
			// 
			this.mincode.Location = new System.Drawing.Point(220, 9);
			this.mincode.Name = "mincode";
			this.mincode.Size = new System.Drawing.Size(69, 21);
			this.mincode.TabIndex = 3;
			this.mincode.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(175, 17);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(53, 17);
			this.label2.TabIndex = 2;
			this.label2.Text = "流水号";
			// 
			// searchbtn
			// 
			this.searchbtn.Location = new System.Drawing.Point(394, 9);
			this.searchbtn.Name = "searchbtn";
			this.searchbtn.Size = new System.Drawing.Size(124, 24);
			this.searchbtn.TabIndex = 4;
			this.searchbtn.Text = "查询";
			this.searchbtn.Click += new System.EventHandler(this.searchbtn_Click);
			// 
			// reportbtn
			// 
			this.reportbtn.Location = new System.Drawing.Point(374, 319);
			this.reportbtn.Name = "reportbtn";
			this.reportbtn.Size = new System.Drawing.Size(116, 25);
			this.reportbtn.TabIndex = 5;
			this.reportbtn.Text = "报表";
			this.reportbtn.Click += new System.EventHandler(this.reportbtn_Click);
			// 
			// dataGrid1
			// 
			this.dataGrid1.CaptionVisible = false;
			this.dataGrid1.DataMember = "";
			this.dataGrid1.FlatMode = true;
			this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText;
			this.dataGrid1.Location = new System.Drawing.Point(8, 34);
			this.dataGrid1.Name = "dataGrid1";
			this.dataGrid1.PreferredColumnWidth = 100;
			this.dataGrid1.ReadOnly = true;
			this.dataGrid1.Size = new System.Drawing.Size(518, 276);
			this.dataGrid1.TabIndex = 6;
			this.dataGrid1.Navigate += new System.Windows.Forms.NavigateEventHandler(this.dataGrid1_Navigate);
			this.dataGrid1.CurrentCellChanged += new System.EventHandler(this.dataGrid1_CurrentCellChanged);
			// 
			// delbtn
			// 
			this.delbtn.Location = new System.Drawing.Point(122, 319);
			this.delbtn.Name = "delbtn";
			this.delbtn.Size = new System.Drawing.Size(106, 25);
			this.delbtn.TabIndex = 7;
			this.delbtn.Text = "删除该条信息";
			this.delbtn.Click += new System.EventHandler(this.delbtn_Click);
			// 
			// hireback
			// 
			this.hireback.Enabled = false;
			this.hireback.Location = new System.Drawing.Point(240, 319);
			this.hireback.Name = "hireback";
			this.hireback.Size = new System.Drawing.Size(106, 25);
			this.hireback.TabIndex = 8;
			this.hireback.Text = "退租";
			this.hireback.Click += new System.EventHandler(this.hireback_Click);
			// 
			// maxcode
			// 
			this.maxcode.Location = new System.Drawing.Point(307, 9);
			this.maxcode.Name = "maxcode";
			this.maxcode.Size = new System.Drawing.Size(70, 21);
			this.maxcode.TabIndex = 9;
			this.maxcode.Text = "";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(289, 17);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(18, 17);
			this.label3.TabIndex = 10;
			this.label3.Text = "到";
			// 
			// printDocument1
			// 
			this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
			// 
			// SReportFrm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(538, 347);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.maxcode);
			this.Controls.Add(this.mincode);
			this.Controls.Add(this.actiontime);
			this.Controls.Add(this.hireback);
			this.Controls.Add(this.delbtn);
			this.Controls.Add(this.dataGrid1);
			this.Controls.Add(this.reportbtn);
			this.Controls.Add(this.searchbtn);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label1);
			this.Name = "SReportFrm";
			this.Text = "SReportFrm";
			((System.ComponentModel.ISupportInitialize)(this.dataGrid1)).EndInit();
			this.ResumeLayout(false);

		}
		#endregion

		private static DataSet Rds=null;
		private static string NowID="",NowAction="";
		private Font printFont;
		private StringReader streamToPrint;
		private void searchbtn_Click(object sender, System.EventArgs e)
		{
			string ActionTime=actiontime.Text.ToString().Trim();
			string MinCode=mincode.Text.ToString().Trim();
			string MaxCode=maxcode.Text.ToString().Trim();
			if((ActionTime=="")&&((MinCode=="")||(MaxCode=="")))
			{

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -