public void AddAirplane(String name, Guid companyID, uint capacity)
        {
            Airplane airplane = new Airplane(name, capacity);
            ServiceFactory.GetAirplanes().AddAirplane(airplane);

            Guid airplaneID = DBFacade.InsertAirplaneAndReturnID(name, companyID, capacity);
            airplane.ID = airplaneID;
            MessageBox.Show("هواپیما با موفقیت اضافه شد");
        }
 private void Initial(Guid ID, Airplane airplane, Airport origin, Airport destination, DateTime departureDate, DateTime arrivalDate, Nullable<DateTime> actualDepartureDate, Nullable<DateTime> actualArrivalDate, FlightState state, uint cost)
 {
     this.ID = ID;
     this.airplane = airplane;
     this.origin = origin;
     this.destination = destination;
     this.departureDate = departureDate;
     this.arrivalDate = arrivalDate;
     this.actualArrivalDate = actualArrivalDate;
     this.actualDepartureDate = actualDepartureDate;
     this.flightState= state;
     this.cost = cost;
 }
 public Flight(Airplane airplane, Airport origin, Airport destination, DateTime departureDate, DateTime arrivalDate, uint cost)
 {
     Initial(new Guid(), airplane, origin, destination, departureDate, arrivalDate, null, null, FlightState.Scheduled, cost);
 }
 public Flight(Guid ID, Airplane airplane, Airport origin, Airport destination, DateTime departureDate, DateTime arrivalDate, Nullable<DateTime> actualDepartureDate, Nullable<DateTime> actualArrivalDate, FlightState state, uint cost)
 {
     Initial(ID, airplane, origin, destination, departureDate, arrivalDate, actualDepartureDate, actualArrivalDate, state, cost);
 }
Beispiel #5
0
 public Flight(Airplane airplane, Airport origin, Airport destination, DateTime departureDate, DateTime arrivalDate, uint cost)
 {
     Initial(new Guid(), airplane, origin, destination, departureDate, arrivalDate, null, null, FlightState.Scheduled, cost);
 }
Beispiel #6
0
 public Flight(Guid ID, Airplane airplane, Airport origin, Airport destination, DateTime departureDate, DateTime arrivalDate, Nullable <DateTime> actualDepartureDate, Nullable <DateTime> actualArrivalDate, FlightState state, uint cost)
 {
     Initial(ID, airplane, origin, destination, departureDate, arrivalDate, actualDepartureDate, actualArrivalDate, state, cost);
 }
 public void AddAirplane(Airplane airplane)
 {
     planes.Add(airplane);
 }
 public void AddAirplane(Airplane airplane)
 {
     planes.Add(airplane);
 }