• 大小: 1.46MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-10-04
  • 语言: C#
  • 标签: asp.ne  

资源简介

asp.net 课程设计 ,飞机票预订系统,可以直接运行 用的vs2017 SqlServer2008 r2.

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
namespace Airplane
{
    public partial class DomesticSelect1 : System.Web.UI.Page
    {
        public static string dt;
        public static string week;
        protected void Page_Load(object sender EventArgs e)
        {
            startdate_box.Attributes.Add(“onfocus“ “javascript:calendar()“);

           

            string[] selectinf = { “国内机票实时查询“ “国内机票“ “航班类型:“ “出发城市:“ “到达城市:“ “出发日期:“ “返程日期:“ };
            dmselect.Text = selectinf[0];
            extra_table.Text = selectinf[1];
            startcity.Text = selectinf[3];
            arrivelcity.Text = selectinf[4];
            startdate.Text = selectinf[5];
            date.Text = DateTime.Now.ToLongDateString();
            dt = DateTime.Today.DayOfWeek.ToString();
            switch (dt)
            {
                case “Monday“:
                    week = “星期一“;
                    break;
                case “Tuesday“:
                    week = “星期二“;
                    break;
                case “Wednesday“:
                    week = “星期三“;
                    break;
                case “Thursday“:
                    week = “星期四“;
                    break;
                case “Friday“:
                    week = “星期五“;
                    break;
                case “Saturday“:
                    week = “星期六“;
                    break;
                case “Sunday“:
                    week = “星期日“;
                    break;
            }
            weekdate.Text = week;

            this.bind();

        }

        private void bind()
        {
            SqlConnection ts = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings[“ts“]);
            //打开数据库连接
            ts.Open();
            //设置SQL语句,查询出所有航班信息
            SqlDataAdapter sda = new SqlDataAdapter(“select * from FlightInformation order by id desc“ ts);
            //创建数据集
            DataSet ds = new DataSet();
            //装载数据集
            sda.Fill(ds “FlightInformation“);
            //数据绑定
            GridView1.DataSource = ds.Tables[“FlightInformation“];
            //将航班信息id设置为GridView主键
            GridView1.DataKeyNames = new string[] { “id“ };
            GridView1.DataBind();
        }
        protected void select_button_Click(object sender ImageClickEventArgs e)
        {
            string start = this.startcity_list.Text;

            string arrived = this.arrivelcity_box.Text;

            string startdate_box = this.startdate_box.Text;

            if (arrivelcity_box.Text == ““)
            {
                Response.Write(“ript language = javascript>alert(‘请确认您填写的信息!‘);loca

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-06-18 16:58  Airplane1\
     目录           0  2018-06-18 17:05  Airplane1\Airplane\
     目录           0  2018-06-18 17:05  Airplane1\Airplane\.vs\
     目录           0  2018-06-18 17:45  Airplane1\Airplane\.vs\Airplane\
     目录           0  2018-06-18 17:45  Airplane1\Airplane\.vs\Airplane\DesignTimeBuild\
     文件         150  2018-06-19 01:03  Airplane1\Airplane\.vs\Airplane\DesignTimeBuild\.dtbcache
     目录           0  2018-06-18 17:06  Airplane1\Airplane\.vs\Airplane\v15\
     文件      121344  2018-12-24 16:34  Airplane1\Airplane\.vs\Airplane\v15\.suo
     目录           0  2018-06-18 17:06  Airplane1\Airplane\.vs\Airplane\v15\Server\
     目录           0  2018-06-18 17:06  Airplane1\Airplane\.vs\Airplane\v15\Server\sqlite3\
     文件           0  2018-06-18 17:06  Airplane1\Airplane\.vs\Airplane\v15\Server\sqlite3\db.lock
     文件     1056768  2018-06-19 09:09  Airplane1\Airplane\.vs\Airplane\v15\Server\sqlite3\storage.ide
     文件       32768  2018-12-24 16:31  Airplane1\Airplane\.vs\Airplane\v15\Server\sqlite3\storage.ide-shm
     文件     4136512  2018-12-24 16:34  Airplane1\Airplane\.vs\Airplane\v15\Server\sqlite3\storage.ide-wal
     目录           0  2018-06-18 17:05  Airplane1\Airplane\.vs\config\
     文件       85582  2018-06-18 17:05  Airplane1\Airplane\.vs\config\applicationhost.config
     目录           0  2018-06-19 09:27  Airplane1\Airplane\Airplane\
     文件       14492  2018-06-17 15:55  Airplane1\Airplane\Airplane\Airplane.csproj
     文件        1206  2018-06-18 17:07  Airplane1\Airplane\Airplane\Airplane.csproj.user
     目录           0  2018-06-18 16:56  Airplane1\Airplane\Airplane\App_Code\
     文件       96941  2018-06-07 12:05  Airplane1\Airplane\Airplane\App_Code\DataSet1.Designer.cs
     文件           3  2018-06-07 12:05  Airplane1\Airplane\Airplane\App_Code\DataSet1.xsc
     文件       22476  2018-06-07 12:05  Airplane1\Airplane\Airplane\App_Code\DataSet1.xsd
     文件         859  2018-06-07 12:05  Airplane1\Airplane\Airplane\App_Code\DataSet1.xss
     文件        2404  2018-06-07 12:05  Airplane1\Airplane\Airplane\App_Code\form.cs
     目录           0  2018-06-18 17:01  Airplane1\Airplane\Airplane\App_Data\
     文件     3145728  2018-12-24 16:45  Airplane1\Airplane\Airplane\App_Data\TicketSaler.mdf
     文件     1048576  2018-12-24 16:45  Airplane1\Airplane\Airplane\App_Data\TicketSaler_log.ldf
     文件       11841  2018-06-17 18:37  Airplane1\Airplane\Airplane\DomesticSelecet.aspx
     文件        5692  2018-06-19 09:27  Airplane1\Airplane\Airplane\DomesticSelecet.aspx.cs
     文件        7452  2018-06-17 18:36  Airplane1\Airplane\Airplane\DomesticSelecet.aspx.designer.cs
............此处省略128个文件信息

评论

共有 条评论