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

📄 transign_form.cs

📁 第三方物流信息管理平台 1、数据库配置: 需要打开MS SQL SERVER 2000企业管理器
💻 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 test007
{
	/// <summary>
	/// transign_Form 的摘要说明。
	/// </summary>
	public class transign_Form : System.Windows.Forms.Form
	{
		private DataSet ds2 = new DataSet();
		private LinkDataBase link2 = new LinkDataBase();
		private string sendTableName2 = "trans_network";
		private string sendStrSQL2 = "SELECT * FROM trans_network";

		private DataTable temptable2=new DataTable();

		string shortpragh="";


		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.TextBox textBox5;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
		private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;
		private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
		private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
		private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
		private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
		private System.Data.SqlClient.SqlConnection sqlConnection1;
		private test007.tDataset tDataset1;
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.ComboBox comboBox2;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public transign_Form()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			this.ds2 = link2.SelectDataBase(sendStrSQL2,sendTableName2);//创建数据库连接
			

			//
			// 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.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.comboBox2 = new System.Windows.Forms.ComboBox();
			this.comboBox1 = new System.Windows.Forms.ComboBox();
			this.button1 = new System.Windows.Forms.Button();
			this.label5 = new System.Windows.Forms.Label();
			this.textBox5 = new System.Windows.Forms.TextBox();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter();
			this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlConnection1 = new System.Data.SqlClient.SqlConnection();
			this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
			this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
			this.tDataset1 = new test007.tDataset();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.tDataset1)).BeginInit();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.Location = new System.Drawing.Point(24, 104);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 0;
			this.label1.Text = "始发地";
			// 
			// label2
			// 
			this.label2.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label2.Location = new System.Drawing.Point(328, 104);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(48, 16);
			this.label2.TabIndex = 1;
			this.label2.Text = "目的地";
			// 
			// label3
			// 
			this.label3.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label3.Location = new System.Drawing.Point(152, 56);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(104, 16);
			this.label3.TabIndex = 2;
			this.label3.Text = "路线设计编号:";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(272, 48);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(176, 21);
			this.textBox1.TabIndex = 4;
			this.textBox1.Text = "";
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
																					this.comboBox2,
																					this.comboBox1,
																					this.label3,
																					this.textBox1,
																					this.label1,
																					this.label2});
			this.groupBox1.Location = new System.Drawing.Point(48, 24);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(584, 152);
			this.groupBox1.TabIndex = 8;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "订单的货物运输信息";
			// 
			// comboBox2
			// 
			this.comboBox2.Items.AddRange(new object[] {
														   "",
														   "乌鲁木齐",
														   "西宁",
														   "兰州",
														   "呼和浩特",
														   "北京",
														   "天津",
														   "沈阳",
														   "长春",
														   "哈尔滨",
														   "大连",
														   "徐州",
														   "郑州",
														   "西安",
														   "成都",
														   "武汉",
														   "上海",
														   "昆明",
														   "贵阳",
														   "株州",
														   "南昌",
														   "福州",
														   "南宁",
														   "柳州",
														   "广州",
														   "深圳"});
			this.comboBox2.Location = new System.Drawing.Point(392, 104);
			this.comboBox2.Name = "comboBox2";
			this.comboBox2.Size = new System.Drawing.Size(176, 20);
			this.comboBox2.TabIndex = 9;
			// 
			// comboBox1
			// 
			this.comboBox1.Items.AddRange(new object[] {
														   "",
														   "乌鲁木齐",
														   "西宁",
														   "兰州",
														   "呼和浩特",
														   "北京",
														   "天津",
														   "沈阳",
														   "长春",
														   "哈尔滨",
														   "大连",
														   "徐州",
														   "郑州",
														   "西安",
														   "成都",
														   "武汉",
														   "上海",
														   "昆明",
														   "贵阳",
														   "株州",
														   "南昌",
														   "福州",
														   "南宁",
														   "柳州",
														   "广州",
														   "深圳"});
			this.comboBox1.Location = new System.Drawing.Point(88, 104);
			this.comboBox1.Name = "comboBox1";
			this.comboBox1.Size = new System.Drawing.Size(176, 20);
			this.comboBox1.TabIndex = 8;
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(240, 200);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(208, 32);
			this.button1.TabIndex = 9;
			this.button1.Text = "马上进行路线设计";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// label5
			// 
			this.label5.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label5.Location = new System.Drawing.Point(48, 256);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(272, 16);
			this.label5.TabIndex = 10;
			this.label5.Text = "根据要求,运算所得的最优化路径为:";
			// 
			// textBox5
			// 
			this.textBox5.Location = new System.Drawing.Point(48, 288);
			this.textBox5.Multiline = true;
			this.textBox5.Name = "textBox5";
			this.textBox5.Size = new System.Drawing.Size(544, 40);
			this.textBox5.TabIndex = 11;
			this.textBox5.Text = "";
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(120, 352);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(176, 32);
			this.button2.TabIndex = 12;
			this.button2.Text = "保存此次设计结果";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(376, 352);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(192, 32);
			this.button3.TabIndex = 13;
			this.button3.Text = "清空重新计算路径";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// sqlDataAdapter1
			// 
			this.sqlDataAdapter1.DeleteCommand = this.sqlDeleteCommand1;
			this.sqlDataAdapter1.InsertCommand = this.sqlInsertCommand1;
			this.sqlDataAdapter1.SelectCommand = this.sqlSelectCommand1;
			this.sqlDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {
																									  new System.Data.Common.DataTableMapping("Table", "city_trans", new System.Data.Common.DataColumnMapping[] {
																																																					new System.Data.Common.DataColumnMapping("城市编码", "城市编码"),
																																																					new System.Data.Common.DataColumnMapping("城市名称", "城市名称")})});

⌨️ 快捷键说明

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