コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TicketInfo obj    = (TicketInfo)Session["Ticket"];
            string     answer = obj.ConfirmedSeats;
            string     source = obj.s;
            string     des    = obj.d;
            DateTime   dj     = obj.doj;

            Response.Write("<html>");
            Response.Write("<table border = 2>");
            Response.Write("<tr>");
            Response.Write("<td>Seat Number</td>");
            Response.Write("<td>" + answer + "</td>");
            Response.Write("</tr>");

            Response.Write("<tr>");
            Response.Write("<td>From</td>");
            Response.Write("<td>" + source + "</td>");
            Response.Write("</tr>");

            Response.Write("<tr>");
            Response.Write("<td>To</td>");
            Response.Write("<td>" + des + "</td>");
            Response.Write("</tr>");

            Response.Write("<tr>");
            Response.Write("<td>Date and Time</td>");
            Response.Write("<td>" + dj + "</td>");
            Response.Write("</tr>");

            Response.Write("</table>");
            Response.Write("</html>");
            Response.Write("Seat Confirmed! <br/>");
        }
コード例 #2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            TicketInfo obj = new TicketInfo();

            obj.SourceId      = int.Parse(SourceCity.SelectedItem.Value);
            obj.destinationId = int.Parse(DestCity.SelectedItem.Value);
            obj.doj           = Calendar.SelectedDate;
            obj.s             = SourceCity.SelectedItem.Text;
            obj.d             = DestCity.SelectedItem.Text;
            Session["Ticket"] = obj;
            Response.Redirect("Services.aspx");
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TicketInfo obj           = (TicketInfo)Session["Ticket"];
            int        SourceId      = obj.SourceId;
            int        DestinationId = obj.destinationId;
            DateTime   doj           = obj.doj;

            dal     dal = new dal();
            DataSet ds  = dal.GetServiceList(SourceId, DestinationId);

            GridView1.DataSource = ds;

            DataBind();
        }
コード例 #4
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            string str = "";

            for (int i = 0; i < SelectedSeats.Items.Count; ++i)
            {
                if (SelectedSeats.Items[i].Selected)
                {
                    str += SelectedSeats.Items[i].ToString() + ",";
                }
            }
            TicketInfo obj = (TicketInfo)Session["Ticket"];

            obj.ConfirmedSeats = str;
            Session["Ticket"]  = obj;
            Response.Redirect("Confirmation.aspx");
        }