📄 form2.cs
字号:
using System;
using System.Text;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data.SqlClient;
using DataAccess;
using System.Windows.Forms.Design;
using BusinessRule.TablesBusines;
using BusinessRule.Table;
using BusinessRule.Tables;
using System.Data;
//using System.Data.SqlClient;\
namespace FromZhuJieMian
{
/// <summary>
/// Form2 的摘要说明。
/// </summary>
public class Form2 : System.Windows.Forms.Form
{
TrainBussiness trainBuss = new TrainBussiness();
private System.Windows.Forms.Label lblTiShi;
private System.Windows.Forms.Label lblGo;
private System.Windows.Forms.TextBox txtGo;
private System.Windows.Forms.Label lblSdop;
private System.Windows.Forms.TextBox txtSdop;
private System.Windows.Forms.Label lblZhongZuanZhan;
private System.Windows.Forms.Button bntSelect;
private System.Windows.Forms.PictureBox picTuPian;
private System.Windows.Forms.Label lbl1;
private System.Windows.Forms.Label lbl2;
private System.Windows.Forms.Label lbl3;
private System.Windows.Forms.Label lbl4;
private System.Windows.Forms.Label lbl5;
private System.Windows.Forms.Label lbl6;
private System.Windows.Forms.Label lbl7;
private System.Windows.Forms.Label lbl8;
public System.Windows.Forms.ComboBox comZhongZhuan;
private System.Windows.Forms.Label lbl9;
private System.Windows.Forms.Label lbl10;
private System.Windows.Forms.Label lbl11;
private System.Windows.Forms.Label lbl12;
private System.Windows.Forms.Label lbl13;
private System.Windows.Forms.Label lbl14;
private System.Windows.Forms.Label lbl15;
private System.Windows.Forms.Label lbl16;
private System.Windows.Forms.Label lbl17;
private System.Windows.Forms.Label lbl18;
private System.Windows.Forms.Label lbl19;
private System.Windows.Forms.Label lbl20;
private System.Windows.Forms.Label lbl21;
private System.Windows.Forms.Label lbl22;
private System.Windows.Forms.Label lbl23;
private System.Windows.Forms.Label lbl24;
private System.Windows.Forms.Label lbl25;
private System.Windows.Forms.Label lbl26;
private System.Windows.Forms.Label lbl27;
private System.Windows.Forms.Label lbl28;
private System.Windows.Forms.Label lbl29;
private System.Windows.Forms.Label lbl30;
private System.Windows.Forms.Label lbl31;
private System.Windows.Forms.Label lbl32;
private System.Windows.Forms.Label lbl33;
private System.Windows.Forms.Label lbl34;
private System.Windows.Forms.Label lbl35;
private System.Windows.Forms.Label lbl36;
private System.Windows.Forms.Label lbl37;
private System.Windows.Forms.Label lbl38;
private System.Windows.Forms.Label lbl39;
private System.Windows.Forms.Label lbl40;
private System.Windows.Forms.Label lbl41;
private System.Windows.Forms.Label lbl42;
private System.Windows.Forms.Label lbl43;
private System.Windows.Forms.Label lbl44;
private System.Windows.Forms.Label lbl45;
private System.Windows.Forms.Label lbl46;
private System.Windows.Forms.Label lbl47;
private System.Windows.Forms.Label lbl48;
private System.Windows.Forms.Label lbl49;
private System.Windows.Forms.Label lblLuXian;
private System.Windows.Forms.Label lblTiShiKuang;
private System.Windows.Forms.Label lblTi;
private System.Windows.Forms.Label lblTishi1;
private System.Windows.Forms.Label lblTishi2;
private System.Windows.Forms.Label lblXueZhe;
private System.Windows.Forms.Button bntGouMai;
private System.Windows.Forms.Button bntTuiChu;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Timer timer1;
private System.ComponentModel.IContainer components;
public Form2()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
//车次详细信息
T_schedule schedule = new T_schedule();
//车次业务逻辑
T_schedule_detail t_schedule = new T_schedule_detail();
TrainBussiness1 scheduleaccess = new TrainBussiness1();
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form2));
this.lblTiShi = new System.Windows.Forms.Label();
this.lblGo = new System.Windows.Forms.Label();
this.txtGo = new System.Windows.Forms.TextBox();
this.lblSdop = new System.Windows.Forms.Label();
this.txtSdop = new System.Windows.Forms.TextBox();
this.lblZhongZuanZhan = new System.Windows.Forms.Label();
this.bntSelect = new System.Windows.Forms.Button();
this.picTuPian = new System.Windows.Forms.PictureBox();
this.lbl1 = new System.Windows.Forms.Label();
this.lbl2 = new System.Windows.Forms.Label();
this.lbl3 = new System.Windows.Forms.Label();
this.lbl4 = new System.Windows.Forms.Label();
this.lbl5 = new System.Windows.Forms.Label();
this.lbl6 = new System.Windows.Forms.Label();
this.lbl7 = new System.Windows.Forms.Label();
this.lbl8 = new System.Windows.Forms.Label();
this.comZhongZhuan = new System.Windows.Forms.ComboBox();
this.lbl9 = new System.Windows.Forms.Label();
this.lbl10 = new System.Windows.Forms.Label();
this.lbl11 = new System.Windows.Forms.Label();
this.lbl12 = new System.Windows.Forms.Label();
this.lbl13 = new System.Windows.Forms.Label();
this.lbl14 = new System.Windows.Forms.Label();
this.lbl15 = new System.Windows.Forms.Label();
this.lbl16 = new System.Windows.Forms.Label();
this.lbl17 = new System.Windows.Forms.Label();
this.lbl18 = new System.Windows.Forms.Label();
this.lbl19 = new System.Windows.Forms.Label();
this.lbl20 = new System.Windows.Forms.Label();
this.lbl21 = new System.Windows.Forms.Label();
this.lbl22 = new System.Windows.Forms.Label();
this.lbl23 = new System.Windows.Forms.Label();
this.lbl24 = new System.Windows.Forms.Label();
this.lbl25 = new System.Windows.Forms.Label();
this.lbl26 = new System.Windows.Forms.Label();
this.lbl27 = new System.Windows.Forms.Label();
this.lbl28 = new System.Windows.Forms.Label();
this.lbl29 = new System.Windows.Forms.Label();
this.lbl30 = new System.Windows.Forms.Label();
this.lbl31 = new System.Windows.Forms.Label();
this.lbl32 = new System.Windows.Forms.Label();
this.lbl33 = new System.Windows.Forms.Label();
this.lbl34 = new System.Windows.Forms.Label();
this.lbl35 = new System.Windows.Forms.Label();
this.lbl36 = new System.Windows.Forms.Label();
this.lbl37 = new System.Windows.Forms.Label();
this.lbl38 = new System.Windows.Forms.Label();
this.lbl39 = new System.Windows.Forms.Label();
this.lbl40 = new System.Windows.Forms.Label();
this.lbl41 = new System.Windows.Forms.Label();
this.lbl42 = new System.Windows.Forms.Label();
this.lbl43 = new System.Windows.Forms.Label();
this.lbl44 = new System.Windows.Forms.Label();
this.lbl45 = new System.Windows.Forms.Label();
this.lbl46 = new System.Windows.Forms.Label();
this.lbl47 = new System.Windows.Forms.Label();
this.lbl48 = new System.Windows.Forms.Label();
this.lbl49 = new System.Windows.Forms.Label();
this.lblLuXian = new System.Windows.Forms.Label();
this.lblTiShiKuang = new System.Windows.Forms.Label();
this.lblTi = new System.Windows.Forms.Label();
this.lblTishi1 = new System.Windows.Forms.Label();
this.lblTishi2 = new System.Windows.Forms.Label();
this.lblXueZhe = new System.Windows.Forms.Label();
this.bntGouMai = new System.Windows.Forms.Button();
this.bntTuiChu = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// lblTiShi
//
this.lblTiShi.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblTiShi.ForeColor = System.Drawing.Color.Red;
this.lblTiShi.Location = new System.Drawing.Point(24, 16);
this.lblTiShi.Name = "lblTiShi";
this.lblTiShi.Size = new System.Drawing.Size(504, 24);
this.lblTiShi.TabIndex = 0;
this.lblTiShi.Text = "提示:请在下面地图中选择城市地点。(起点站和终点站)";
//
// lblGo
//
this.lblGo.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblGo.ForeColor = System.Drawing.Color.Red;
this.lblGo.Location = new System.Drawing.Point(16, 80);
this.lblGo.Name = "lblGo";
this.lblGo.Size = new System.Drawing.Size(64, 24);
this.lblGo.TabIndex = 1;
this.lblGo.Text = "起点站";
//
// txtGo
//
this.txtGo.Location = new System.Drawing.Point(96, 80);
this.txtGo.Name = "txtGo";
this.txtGo.Size = new System.Drawing.Size(104, 21);
this.txtGo.TabIndex = 2;
this.txtGo.Text = "";
this.txtGo.TextChanged += new System.EventHandler(this.txtGo_TextChanged);
//
// lblSdop
//
this.lblSdop.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblSdop.ForeColor = System.Drawing.Color.Red;
this.lblSdop.Location = new System.Drawing.Point(224, 80);
this.lblSdop.Name = "lblSdop";
this.lblSdop.Size = new System.Drawing.Size(64, 24);
this.lblSdop.TabIndex = 3;
this.lblSdop.Text = " 终点站";
//
// txtSdop
//
this.txtSdop.Location = new System.Drawing.Point(312, 80);
this.txtSdop.Name = "txtSdop";
this.txtSdop.Size = new System.Drawing.Size(112, 21);
this.txtSdop.TabIndex = 4;
this.txtSdop.Text = "";
//
// lblZhongZuanZhan
//
this.lblZhongZuanZhan.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblZhongZuanZhan.ForeColor = System.Drawing.Color.Red;
this.lblZhongZuanZhan.Location = new System.Drawing.Point(456, 80);
this.lblZhongZuanZhan.Name = "lblZhongZuanZhan";
this.lblZhongZuanZhan.Size = new System.Drawing.Size(64, 24);
this.lblZhongZuanZhan.TabIndex = 5;
this.lblZhongZuanZhan.Text = "中转站";
//
// bntSelect
//
this.bntSelect.BackColor = System.Drawing.SystemColors.InactiveCaption;
this.bntSelect.Font = new System.Drawing.Font("宋体", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.bntSelect.ForeColor = System.Drawing.Color.Red;
this.bntSelect.Location = new System.Drawing.Point(696, 72);
this.bntSelect.Name = "bntSelect";
this.bntSelect.Size = new System.Drawing.Size(88, 40);
this.bntSelect.TabIndex = 7;
this.bntSelect.Text = "查询";
this.bntSelect.Click += new System.EventHandler(this.bntSelect_Click);
//
// picTuPian
//
this.picTuPian.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("picTuPian.BackgroundImage")));
this.picTuPian.Location = new System.Drawing.Point(8, 208);
this.picTuPian.Name = "picTuPian";
this.picTuPian.Size = new System.Drawing.Size(640, 432);
this.picTuPian.TabIndex = 8;
this.picTuPian.TabStop = false;
//
// lbl1
//
this.lbl1.Location = new System.Drawing.Point(344, 344);
this.lbl1.Name = "lbl1";
this.lbl1.Size = new System.Drawing.Size(56, 16);
this.lbl1.TabIndex = 9;
this.lbl1.Text = "呼和浩特";
this.lbl1.Click += new System.EventHandler(this.lbl1_Click);
//
// lbl2
//
this.lbl2.Location = new System.Drawing.Point(456, 248);
this.lbl2.Name = "lbl2";
this.lbl2.Size = new System.Drawing.Size(56, 16);
this.lbl2.TabIndex = 10;
this.lbl2.Text = "齐齐哈尔";
//
// lbl3
//
this.lbl3.Location = new System.Drawing.Point(496, 272);
this.lbl3.Name = "lbl3";
this.lbl3.Size = new System.Drawing.Size(48, 16);
this.lbl3.TabIndex = 11;
this.lbl3.Text = "哈尔滨";
this.lbl3.Click += new System.EventHandler(this.lbl3_Click);
//
// lbl4
//
this.lbl4.Location = new System.Drawing.Point(456, 296);
this.lbl4.Name = "lbl4";
this.lbl4.Size = new System.Drawing.Size(32, 16);
this.lbl4.TabIndex = 12;
this.lbl4.Text = "长春";
this.lbl4.Click += new System.EventHandler(this.lbl4_Click);
//
// lbl5
//
this.lbl5.Location = new System.Drawing.Point(504, 296);
this.lbl5.Name = "lbl5";
this.lbl5.Size = new System.Drawing.Size(32, 16);
this.lbl5.TabIndex = 13;
this.lbl5.Text = "吉林";
this.lbl5.Click += new System.EventHandler(this.lbl5_Click);
//
// lbl6
//
this.lbl6.Location = new System.Drawing.Point(472, 336);
this.lbl6.Name = "lbl6";
this.lbl6.Size = new System.Drawing.Size(32, 16);
this.lbl6.TabIndex = 14;
this.lbl6.Text = "沈阳";
this.lbl6.Click += new System.EventHandler(this.lbl6_Click);
//
// lbl7
//
this.lbl7.Location = new System.Drawing.Point(472, 360);
this.lbl7.Name = "lbl7";
this.lbl7.Size = new System.Drawing.Size(32, 16);
this.lbl7.TabIndex = 15;
this.lbl7.Text = "大连";
this.lbl7.Click += new System.EventHandler(this.lbl7_Click);
//
// lbl8
//
this.lbl8.Location = new System.Drawing.Point(400, 344);
this.lbl8.Name = "lbl8";
this.lbl8.Size = new System.Drawing.Size(32, 16);
this.lbl8.TabIndex = 16;
this.lbl8.Text = "北京";
this.lbl8.Click += new System.EventHandler(this.lbl8_Click);
//
// comZhongZhuan
//
this.comZhongZhuan.Location = new System.Drawing.Point(544, 80);
this.comZhongZhuan.Name = "comZhongZhuan";
this.comZhongZhuan.Size = new System.Drawing.Size(128, 20);
this.comZhongZhuan.TabIndex = 17;
this.comZhongZhuan.Click += new System.EventHandler(this.comZhongZhuan_Click);
//
// lbl9
//
this.lbl9.Location = new System.Drawing.Point(432, 368);
this.lbl9.Name = "lbl9";
this.lbl9.Size = new System.Drawing.Size(32, 16);
this.lbl9.TabIndex = 18;
this.lbl9.Text = "天津";
this.lbl9.Click += new System.EventHandler(this.lbl9_Click);
//
// lbl10
//
this.lbl10.Location = new System.Drawing.Point(408, 384);
this.lbl10.Name = "lbl10";
this.lbl10.Size = new System.Drawing.Size(48, 16);
this.lbl10.TabIndex = 19;
this.lbl10.Text = "石家庄";
this.lbl10.Click += new System.EventHandler(this.lbl10_Click);
//
// lbl11
//
this.lbl11.Location = new System.Drawing.Point(368, 376);
this.lbl11.Name = "lbl11";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -