Example #1
0
        public void deleteflight(string id)
        {
            Flightplan p = flights.Where(x => x.FlightPlanId == id).FirstOrDefault();

            if (p == null)
            {
                throw new Exception("id not found ");
            }
            else
            {
                flights.Remove(p);
            }
        }
Example #2
0
        public Flightplan getbyid(String id)
        {
            Flightplan p = flights.Where(x => x.FlightPlanId == id).FirstOrDefault();

            if (p == null)
            {
                return(null);

                throw new Exception("id not found ");
            }
            else
            {
                return(p);
            }
        }
Example #3
0
 public void addflight(Flightplan f)
 {
     flights.Add(f);
 }