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

📄 the_return_orderform.cs

📁 第三方物流信息管理平台 1、数据库配置: 需要打开MS SQL SERVER 2000企业管理器
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace test007
{
	/// <summary>
	/// the_return_orderForm 的摘要说明。
	/// </summary>
	public class the_return_orderForm : System.Windows.Forms.Form
	{
		private DataSet ds = new DataSet();

		private LinkDataBase link = new LinkDataBase();	
		private string sendTableName = "return_receipt";
		private string sendStrSQL="SELECT * FROM return_receipt";

		private DataTable temptable=new DataTable();

		private System.Windows.Forms.Label label1;
		protected System.Windows.Forms.Label label3;
		protected System.Windows.Forms.Label label2;
		protected System.Windows.Forms.Label label4;
		protected System.Windows.Forms.Label label5;
		protected System.Windows.Forms.Label label6;
		protected System.Windows.Forms.Label label7;
		protected System.Windows.Forms.Label label8;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.Label label13;
		private System.Windows.Forms.Label label14;
		private System.Windows.Forms.Label label15;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public the_return_orderForm()
		{
			//
			// 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.label3 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.label5 = new System.Windows.Forms.Label();
			this.label6 = new System.Windows.Forms.Label();
			this.label7 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.label12 = new System.Windows.Forms.Label();
			this.label11 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.label9 = new System.Windows.Forms.Label();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.label15 = new System.Windows.Forms.Label();
			this.label14 = new System.Windows.Forms.Label();
			this.label13 = new System.Windows.Forms.Label();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.Location = new System.Drawing.Point(232, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(96, 24);
			this.label1.TabIndex = 0;
			this.label1.Text = "回执单信息";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(16, 56);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(72, 16);
			this.label3.TabIndex = 3;
			this.label3.Text = "回执单号:";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(16, 112);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(72, 16);
			this.label2.TabIndex = 12;
			this.label2.Text = "订单编号:";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(16, 48);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(80, 16);
			this.label4.TabIndex = 13;
			this.label4.Text = "配送员帐号:";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(8, 232);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(96, 16);
			this.label5.TabIndex = 14;
			this.label5.Text = "接收货物数量:";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(16, 168);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(72, 16);
			this.label6.TabIndex = 15;
			this.label6.Text = "货物状态:";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(24, 104);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(72, 16);
			this.label7.TabIndex = 16;
			this.label7.Text = "收货人:";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(16, 160);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(144, 16);
			this.label8.TabIndex = 17;
			this.label8.Text = "收货详细地址:";
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.label12,
																					this.label11,
																					this.label10,
																					this.label9,
																					this.label3,
																					this.label2,
																					this.label5,
																					this.label6});
			this.groupBox1.Location = new System.Drawing.Point(16, 48);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(256, 280);
			this.groupBox1.TabIndex = 18;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "基本信息";
			// 
			// label12
			// 
			this.label12.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label12.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label12.ForeColor = System.Drawing.Color.Red;
			this.label12.Location = new System.Drawing.Point(104, 224);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(136, 24);
			this.label12.TabIndex = 19;
			this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label11
			// 
			this.label11.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label11.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label11.ForeColor = System.Drawing.Color.Red;
			this.label11.Location = new System.Drawing.Point(104, 168);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(136, 24);
			this.label11.TabIndex = 18;
			this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label10
			// 
			this.label10.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label10.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label10.ForeColor = System.Drawing.Color.Red;
			this.label10.Location = new System.Drawing.Point(104, 112);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(136, 24);
			this.label10.TabIndex = 17;
			this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label9
			// 
			this.label9.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label9.ForeColor = System.Drawing.Color.Red;
			this.label9.Location = new System.Drawing.Point(104, 56);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(136, 24);
			this.label9.TabIndex = 16;
			this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.label15,
																					this.label14,
																					this.label13,
																					this.label8,
																					this.label7,
																					this.label4});
			this.groupBox2.Location = new System.Drawing.Point(296, 48);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(312, 280);
			this.groupBox2.TabIndex = 19;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "接收货物信息";
			// 
			// label15
			// 
			this.label15.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label15.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label15.ForeColor = System.Drawing.Color.Red;
			this.label15.Location = new System.Drawing.Point(24, 184);
			this.label15.Name = "label15";
			this.label15.Size = new System.Drawing.Size(264, 56);
			this.label15.TabIndex = 20;
			this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label14
			// 
			this.label14.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label14.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label14.ForeColor = System.Drawing.Color.Red;
			this.label14.Location = new System.Drawing.Point(104, 104);
			this.label14.Name = "label14";
			this.label14.Size = new System.Drawing.Size(136, 24);
			this.label14.TabIndex = 19;
			this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label13
			// 
			this.label13.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
			this.label13.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label13.ForeColor = System.Drawing.Color.Red;
			this.label13.Location = new System.Drawing.Point(104, 40);
			this.label13.Name = "label13";
			this.label13.Size = new System.Drawing.Size(136, 24);
			this.label13.TabIndex = 18;
			this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// the_return_orderForm
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(624, 373);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.groupBox2,
																		  this.groupBox1,
																		  this.label1});
			this.Name = "the_return_orderForm";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "回执单";
			this.Load += new System.EventHandler(this.the_return_orderForm_Load);
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		private void the_return_orderForm_Load(object sender, System.EventArgs e)
		{
			string re_ordernum=finish_orderForm.ordernum11;
			int re_order=System.Int32.Parse(re_ordernum);
			int pp=0;

			//sendStrSQL="SELECT * FROM return_receipt where 订单编号='re_order'";
			//temptable=this.link.SelectDataBase(sendStrSQL);

			this.ds = link.SelectDataBase(sendStrSQL,sendTableName);//创建数据库连接

			for(int i=0;i<ds.Tables[0].Rows.Count;i++)
			{
				if(ds.Tables[0].Rows[i][1].ToString().Trim()==re_ordernum)
					pp=i;
			}

			this.label10.Text=re_ordernum;
			this.label9.Text=this.ds.Tables[0].Rows[pp][0].ToString().Trim();
			this.label11.Text=this.ds.Tables[0].Rows[pp][4].ToString().Trim();
			this.label12.Text=this.ds.Tables[0].Rows[pp][3].ToString().Trim();
			this.label13.Text=this.ds.Tables[0].Rows[pp][2].ToString().Trim();
			this.label14.Text=this.ds.Tables[0].Rows[pp][5].ToString().Trim();
			this.label15.Text=this.ds.Tables[0].Rows[pp][6].ToString().Trim();

		}
	}
}

⌨️ 快捷键说明

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