• 大小: 0.14M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-17
  • 语言: 其他
  • 标签: 其他  

资源简介

TicketBooking.zip

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TicketBooking
{
    public partial class _Default : System.Web.UI.Page
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“Ticket“].ConnectionString);
        public int set=100 gold_seat=50;
        public string seat_no = ““ getSeat chair;
        protected void Page_Load(object sender EventArgs e)
        {
            genrateSeat();
        }
        [System.Web.Services.WebMethod]
        public static string ReserveSeat(string name)
        {
            return name;
        }
        protected void genrateSeat()
        {
            string query1 = @“SELECT SeatNo FROM  BookedTickets WHERE (Status=‘True‘)“;
            SqlDataAdapter adapter = new SqlDataAdapter(query1 con);
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                getSeat = getSeat + ““ + dt.Rows[i][0].ToString().Trim() + “ “;
            }
        }
        protected string checkSeat(string sitting)
        {
            try
            {
                string[] words = getSeat.Split(‘ ‘);
                foreach (string word in words)
                {
                    try
                    {
                        if (sitting.Equals(word))
                        {
                            chair = ““;
                            return chair;
                        }
                        else
                            chair = “click=\“seat(‘“ + sitting + “‘)\“ src=‘images/chair/G_chair.gif‘ style=‘cursor:pointer;‘/>“;
                    }
                    catch (ArgumentOutOfRangeException) { }
                }
            }
            catch (NullReferenceException)
            {
                chair = “click=\“seat(‘“ + sitting + “‘)\“ src=‘images/chair/G_chair.gif‘ style=‘cursor:pointer;‘/>“;
            }
            return chair;
        }

    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-05-05 20:53  TicketBooking\
     目录           0  2014-05-05 23:54  TicketBooking\TicketBooking\
     目录           0  2014-05-05 20:52  TicketBooking\TicketBooking\App_Data\
     目录           0  2014-05-05 21:06  TicketBooking\TicketBooking\bin\
     文件        6144  2014-05-06 00:28  TicketBooking\TicketBooking\bin\TicketBooking.dll
     文件       15872  2014-05-06 00:28  TicketBooking\TicketBooking\bin\TicketBooking.pdb
     文件        2165  2014-05-05 23:58  TicketBooking\TicketBooking\Default.aspx
     文件        2357  2014-05-05 23:30  TicketBooking\TicketBooking\Default.aspx.cs
     文件         780  2014-05-05 23:07  TicketBooking\TicketBooking\Default.aspx.designer.cs
     文件        8380  2014-05-05 23:54  TicketBooking\TicketBooking\favicon.ico
     目录           0  2014-05-05 21:06  TicketBooking\TicketBooking\images\
     目录           0  2013-12-12 19:37  TicketBooking\TicketBooking\images\chair\
     文件        1064  2013-04-26 11:49  TicketBooking\TicketBooking\images\chair\Gy_chair.gif
     文件        1065  2013-04-26 11:49  TicketBooking\TicketBooking\images\chair\G_chair.gif
     文件        1063  2013-04-26 11:49  TicketBooking\TicketBooking\images\chair\R_chair.gif
     目录           0  2014-05-05 20:52  TicketBooking\TicketBooking\Properties\
     文件        1397  2014-05-05 20:52  TicketBooking\TicketBooking\Properties\AssemblyInfo.cs
     目录           0  2014-05-05 20:52  TicketBooking\TicketBooking\scripts\
     文件      153092  2014-05-05 20:52  TicketBooking\TicketBooking\scripts\jquery-1.7.1.intellisense.js
     文件      248210  2014-05-05 20:52  TicketBooking\TicketBooking\scripts\jquery-1.7.1.js
     文件       93868  2014-05-05 20:52  TicketBooking\TicketBooking\scripts\jquery-1.7.1.min.js
     文件        5041  2014-05-06 00:28  TicketBooking\TicketBooking\TicketBooking.csproj
     文件        1086  2014-05-06 00:28  TicketBooking\TicketBooking\TicketBooking.csproj.user
     文件        1223  2014-05-05 23:18  TicketBooking\TicketBooking\Web.config
     文件        1299  2014-05-05 20:52  TicketBooking\TicketBooking\Web.Debug.config
     文件        1360  2014-05-05 20:52  TicketBooking\TicketBooking\Web.Release.config
     文件         929  2014-05-05 20:53  TicketBooking\TicketBooking.sln
     文件       20992  2014-05-06 07:25  TicketBooking\TicketBooking.v11.suo

评论

共有 条评论