コード例 #1
0
        public List <AdminViewFlight> searchFlight(SearchFlight search)
        {
            List <AdminViewFlight> list = new List <AdminViewFlight>();

            if (search.Date == "")
            {
                var f = new AdminViewFlight();
                f.ID = 0;
                list.Add(f);
                return(list);
            }
            else
            {
                var f = new AdminViewFlight()
                {
                    ID              = 1,
                    Departure       = "Oslo",
                    DepartureTime   = "00:00",
                    Destination     = "Bardufoss",
                    DestinationTime = "00:00",
                    Airplane        = "Boeing737",
                    ClassType       = "Økonomi",
                    Price           = 500,
                    Seats           = 500,
                    TravelDate      = "00/00/00"
                };
                list.Add(f);
                list.Add(f);
                list.Add(f);
                return(list);
            }
        }
コード例 #2
0
        public List <AdminViewFlight> listAllFlights()
        {
            var list   = new List <AdminViewFlight>();
            var flight = new AdminViewFlight()
            {
                ID              = 1,
                Departure       = "Oslo",
                DepartureTime   = "00:00",
                Destination     = "Bardufoss",
                DestinationTime = "00:00",
                Airplane        = "Boeing737",
                ClassType       = "Økonomi",
                Price           = 500,
                Seats           = 500,
                TravelDate      = "00/00/00"
            };

            list.Add(flight);
            list.Add(flight);
            list.Add(flight);

            return(list);
        }