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

📄 frmorderdetailsdata.cs

📁 Winform_OnlineTraning 我们培训机构的在线培训部分
💻 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;

namespace Example_1
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class frmOrderDetailsData : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label lblTotal;
		private System.Windows.Forms.Label lblOrderDetailID;
		private System.Windows.Forms.Label lblOrderID;
		private System.Windows.Forms.Label lblProductID;
		private System.Windows.Forms.Label lblQuantity;
		private System.Windows.Forms.Label lblUnitPrice;
		private System.Windows.Forms.TextBox txtTotal;
		private System.Windows.Forms.TextBox txtUnitPrice;
		private System.Windows.Forms.TextBox txtQuantity;
		private System.Windows.Forms.TextBox txtProductID;
		private System.Windows.Forms.TextBox txtOrderID;
		private System.Windows.Forms.TextBox txtOrderDetailID;
		private System.Windows.Forms.Button btnPrint;
		private System.Windows.Forms.Button btnExit;
		private System.Windows.Forms.PictureBox picPicture;
		private System.Drawing.Printing.PrintDocument pdocOrderDetails;
		private System.Windows.Forms.PrintPreviewDialog ppdlgOrderDetails;

		//User Defined variables
		private SqlConnection objSqlConnection;
		private SqlDataReader objSqlDataReader;
		private SqlCommand objSqlCommand;
		private System.Windows.Forms.PageSetupDialog pageSetupDialog1;
		private System.Windows.Forms.Button btnSetup;
		private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
		private System.Windows.Forms.PrintDialog printDialog2;
		private System.Windows.Forms.Button btnPrintPrev;
		
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmOrderDetailsData()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmOrderDetailsData));
			this.lblTotal = new System.Windows.Forms.Label();
			this.lblOrderDetailID = new System.Windows.Forms.Label();
			this.lblOrderID = new System.Windows.Forms.Label();
			this.lblProductID = new System.Windows.Forms.Label();
			this.lblQuantity = new System.Windows.Forms.Label();
			this.lblUnitPrice = new System.Windows.Forms.Label();
			this.txtTotal = new System.Windows.Forms.TextBox();
			this.txtUnitPrice = new System.Windows.Forms.TextBox();
			this.txtQuantity = new System.Windows.Forms.TextBox();
			this.txtProductID = new System.Windows.Forms.TextBox();
			this.txtOrderID = new System.Windows.Forms.TextBox();
			this.txtOrderDetailID = new System.Windows.Forms.TextBox();
			this.btnPrint = new System.Windows.Forms.Button();
			this.btnExit = new System.Windows.Forms.Button();
			this.picPicture = new System.Windows.Forms.PictureBox();
			this.pdocOrderDetails = new System.Drawing.Printing.PrintDocument();
			this.ppdlgOrderDetails = new System.Windows.Forms.PrintPreviewDialog();
			this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
			this.btnSetup = new System.Windows.Forms.Button();
			this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
			this.btnPrintPrev = new System.Windows.Forms.Button();
			this.printDialog2 = new System.Windows.Forms.PrintDialog();
			this.SuspendLayout();
			// 
			// lblTotal
			// 
			this.lblTotal.Location = new System.Drawing.Point(8, 208);
			this.lblTotal.Name = "lblTotal";
			this.lblTotal.Size = new System.Drawing.Size(72, 23);
			this.lblTotal.TabIndex = 1;
			this.lblTotal.Text = "总计:";
			// 
			// lblOrderDetailID
			// 
			this.lblOrderDetailID.Location = new System.Drawing.Point(8, 24);
			this.lblOrderDetailID.Name = "lblOrderDetailID";
			this.lblOrderDetailID.Size = new System.Drawing.Size(96, 23);
			this.lblOrderDetailID.TabIndex = 2;
			this.lblOrderDetailID.Text = "订单细目编号:";
			// 
			// lblOrderID
			// 
			this.lblOrderID.Location = new System.Drawing.Point(8, 56);
			this.lblOrderID.Name = "lblOrderID";
			this.lblOrderID.Size = new System.Drawing.Size(80, 23);
			this.lblOrderID.TabIndex = 3;
			this.lblOrderID.Text = "订单编号:";
			// 
			// lblProductID
			// 
			this.lblProductID.Location = new System.Drawing.Point(8, 96);
			this.lblProductID.Name = "lblProductID";
			this.lblProductID.Size = new System.Drawing.Size(80, 23);
			this.lblProductID.TabIndex = 4;
			this.lblProductID.Text = "产品编号:";
			// 
			// lblQuantity
			// 
			this.lblQuantity.Location = new System.Drawing.Point(8, 136);
			this.lblQuantity.Name = "lblQuantity";
			this.lblQuantity.Size = new System.Drawing.Size(80, 23);
			this.lblQuantity.TabIndex = 5;
			this.lblQuantity.Text = "数量:";
			// 
			// lblUnitPrice
			// 
			this.lblUnitPrice.Location = new System.Drawing.Point(8, 176);
			this.lblUnitPrice.Name = "lblUnitPrice";
			this.lblUnitPrice.Size = new System.Drawing.Size(72, 23);
			this.lblUnitPrice.TabIndex = 6;
			this.lblUnitPrice.Text = "单价:";
			// 
			// txtTotal
			// 
			this.txtTotal.Location = new System.Drawing.Point(112, 200);
			this.txtTotal.Name = "txtTotal";
			this.txtTotal.ReadOnly = true;
			this.txtTotal.TabIndex = 7;
			this.txtTotal.Text = "";
			// 
			// txtUnitPrice
			// 
			this.txtUnitPrice.Location = new System.Drawing.Point(112, 168);
			this.txtUnitPrice.Name = "txtUnitPrice";
			this.txtUnitPrice.ReadOnly = true;
			this.txtUnitPrice.TabIndex = 8;
			this.txtUnitPrice.Text = "";
			// 
			// txtQuantity
			// 
			this.txtQuantity.Location = new System.Drawing.Point(112, 128);
			this.txtQuantity.Name = "txtQuantity";
			this.txtQuantity.ReadOnly = true;
			this.txtQuantity.TabIndex = 9;
			this.txtQuantity.Text = "";
			// 
			// txtProductID
			// 
			this.txtProductID.Location = new System.Drawing.Point(112, 96);
			this.txtProductID.Name = "txtProductID";
			this.txtProductID.ReadOnly = true;
			this.txtProductID.TabIndex = 10;
			this.txtProductID.Text = "";
			// 
			// txtOrderID
			// 
			this.txtOrderID.Location = new System.Drawing.Point(112, 56);
			this.txtOrderID.Name = "txtOrderID";
			this.txtOrderID.ReadOnly = true;
			this.txtOrderID.TabIndex = 11;
			this.txtOrderID.Text = "";
			// 
			// txtOrderDetailID
			// 
			this.txtOrderDetailID.Location = new System.Drawing.Point(112, 24);
			this.txtOrderDetailID.Name = "txtOrderDetailID";
			this.txtOrderDetailID.ReadOnly = true;
			this.txtOrderDetailID.TabIndex = 12;
			this.txtOrderDetailID.Text = "";
			// 
			// btnPrint
			// 
			this.btnPrint.Location = new System.Drawing.Point(512, 288);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new System.Drawing.Size(80, 23);
			this.btnPrint.TabIndex = 0;
			this.btnPrint.Text = "打印(&P)";
			this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
			// 
			// btnExit
			// 
			this.btnExit.Location = new System.Drawing.Point(600, 288);
			this.btnExit.Name = "btnExit";
			this.btnExit.Size = new System.Drawing.Size(80, 23);
			this.btnExit.TabIndex = 0;
			this.btnExit.Text = "退出(&E)";
			this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
			// 
			// picPicture
			// 

⌨️ 快捷键说明

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