Exemple #1
0
 def store_aircraft(self):
     #Creates a new aircraft
     airc = {
         'aircraft_type': self.aircraft_type,
         'num_seats': self.num_seats,
         'manufacturer': self.manufacturer,
         'name_of_aircraft': self.name_of_aircraft
     }
     storing = Database(1, airc)
     storing.create_data()
Exemple #2
0
 def store_voyage(self):
     #Creates new voyages
     voy = {
         'date_from_iceland': self.date_from_iceland,
         'destination': self.destination,
         'date_back_to_iceland': self.date_back_to_iceland,
         'pilot_captain': self.pilot_captain,
         'pilot_copilot': self.pilot_copilot,
         'flight_attendant_supervisor': self.flight_attendant_supervisor,
         'flight_attendant': self.flight_attendant
     }
     storing = Database(6, voy)
     storing.create_data()
Exemple #3
0
 def store_destination(self):
     #Create new destination
     dest_dict = {
         'id': self.short,
         'location': self.location,
         'airport': self.airport,
         'flighttime': self.flighttime,
         'distance': self.distance,
         'contact': self.emergencycontact,
         'number': self.emergencynumber
     }
     storing = Database(3, dest_dict)
     storing.create_data()
Exemple #4
0
 def save_employee(self):
     #Append new employee
     emp = {
         'ssn': self.ssn,
         'firstname': self.firstname,
         'lastname': self.lastname,
         'role': self.role,
         'rank': self.rank,
         'licence': self.licence,
         'address': self.address,
         'mobile': self.mobile,
         'email': self.email_str,
         'working': self.working,
         'arriving': self.arriving
     }
     storing = Database(2, emp)
     storing.create_data()