Example #1
0
        public static string showFlights(string username, string departure, string destination, string date)
        {
            string html = "<tr><td>Flight Name</td><th></th></tr>";

            utils.DbUtils dbUtils = new utils.DbUtils();
            List <String> flights = dbUtils.selectFlights(departure, destination, date);

            for (int i = 0; i < flights.Count; i++)
            {
                html += "<tr><td>" + flights[i] + "</td>"
                        + "<td onclick =\"rezerveFlight('" + username + "','" + flights[i] + "')\">Rezerve</td></tr>";
            }
            HttpContext.Current.Session["date"] = date;
            HttpContext.Current.Session["city"] = destination;
            System.Diagnostics.Debug.Write(HttpContext.Current.Session["city"]);
            return(html);
        }