/// <summary>
        /// Add generated flight info into database
        /// </summary>
        /// <param name="distance">Distance of Flight generateed</param>
        /// <param name="c">Major City Start</param>
        /// <param name="c2">Major City End</param>
        /// <param name="database">Database Connection Reference</param>
        public static void AddFlight(int distance, MAJOR_CITY c, MAJOR_CITY c2, DatabaseClassDataContext database)
        {
            int fetch  = 0;
            int fetch2 = 0;

            if (database.AIRPORTs.Where(x => x.CityName.Equals(c.Name)).ToList().Count > 1)
            {
                fetch = _random.Next(0, 2);
            }

            if (database.AIRPORTs.Where(x => x.CityName.Equals(c2.Name)).ToList().Count > 1)
            {
                fetch2 = _random.Next(0, 2);
            }
            DataScriptsCPSC471.AIRPORT departureAirport = database.AIRPORTs.Where(x => x.CityName.Equals(c.Name)).ToList()[fetch];


            DataScriptsCPSC471.AIRPORT arrivalAirport = database.AIRPORTs.Where(x => x.CityName.Equals(c2.Name)).ToList()[fetch2];

            string deptAirportName    = departureAirport.Name;
            string arrivalAirportName = arrivalAirport.Name;

            //Debugging Boolean Check to ensure the flight does not already exist
            //if (database.FLIGHTs.Where(x => x.departure_airport.Equals(deptAirportName) && x.arrival_airport.Equals(arrivalAirportName)).ToList().Count> 0 )
            //{
            //    FLIGHT f = database.FLIGHTs.Where(x => x.departure_airport.Equals(deptAirportName) && x.arrival_airport.Equals(arrivalAirportName)).ToList()[0];
            //    Console.WriteLine("Flight Exists!");
            //    Console.WriteLine(f.arrival_time);
            //    Console.WriteLine(f.departure_time);
            //    return;
            //}



            string flightid = GenerateFlightNumber();

            while (database.FLIGHTs.SingleOrDefault(x => x.Flight_id.Equals(flightid)) != null)
            {
                flightid = GenerateFlightNumber();
                Console.WriteLine("Generating New Unique Flight Number");
            }
            DateTime deptTime = DateTime.Now.AddMinutes(30 * _random.Next(0, 4));

            DataScriptsCPSC471.FLIGHT flight = new DataScriptsCPSC471.FLIGHT()
            {
                Flight_id         = flightid,
                arrival_airport   = arrivalAirportName,
                departure_airport = deptAirportName,
                departure_time    = deptTime,
                arrival_time      = deptTime.AddMinutes(((double)distance / (double)926) * _random.Next(600, 1000)),
                distance          = distance,
                base_price        = 600
            };
            database.FLIGHTs.InsertOnSubmit(flight);
            database.SubmitChanges();
        }
 partial void DeleteMAJOR_CITY(MAJOR_CITY instance);
 partial void UpdateMAJOR_CITY(MAJOR_CITY instance);
 partial void InsertMAJOR_CITY(MAJOR_CITY instance);
 private void detach_MAJOR_CITies(MAJOR_CITY entity)
 {
     this.SendPropertyChanging();
     entity.COUNTRY = null;
 }