Esempio n. 1
0
 public void AddCharterTrip(CharterTrip charterTrip, Aircraft aircraft, Customer customer)
 {
     charterTrip.AircraftNumber = aircraft.AircraftNumber;
     charterTrip.CustomerId     = customer.CustomerId;
     _charterTripRepository.Add(charterTrip);
     _charterTripRepository.SaveChanges();
 }
Esempio n. 2
0
 public void AddCrewMember(CrewAssignment crewAssignment, Employee employee, CharterTrip charterTrip)
 {
     crewAssignment.EmployeeId    = employee.EmployeeId;
     crewAssignment.CharterTripId = charterTrip.CharterTripId;
     _crewAssignmentRepository.Add(crewAssignment);
     _crewAssignmentRepository.SaveChanges();
 }
Esempio n. 3
0
 public void AddCharterFlightCharge(CharterFlightCharge charterFlightCharge, CharterTrip charterTrip)
 {
     charterFlightCharge.CharterTripId = charterTrip.CharterTripId;
     charterTrip.TotalCharge          += charterFlightCharge.Amount;
     charterTrip.RemainingBalance     += charterFlightCharge.Amount;
     _charterTripRepository.Update(charterTrip);
     _charterTripRepository.SaveChanges();
     _charterFlightChargeRepository.Add(charterFlightCharge);
     _charterFlightChargeRepository.SaveChanges();
 }
Esempio n. 4
0
 public void DeleteCharterTrip(CharterTrip charterTrip)
 {
     _charterTripRepository.Remove(charterTrip);
     _charterTripRepository.SaveChanges();
 }
Esempio n. 5
0
 public void UpdateCharterTrip(CharterTrip charterTrip)
 {
     _charterTripRepository.Update(charterTrip);
     _charterTripRepository.SaveChanges();
 }
Esempio n. 6
0
 public void AddBalanceHistory(BalanceHistory balanceHistory, CharterTrip charterTrip)
 {
     balanceHistory.CharterTripId = charterTrip.CharterTripId;
     _balanceHistoryRepository.Add(balanceHistory);
     _balanceHistoryRepository.SaveChanges();
 }
Esempio n. 7
0
 public void AddFlightToCharterTrip(Flight flight, CharterTrip charterTrip)
 {
     flight.CharterTripId = charterTrip.CharterTripId;
     _flightRepository.Add(flight);
     _flightRepository.SaveChanges();
 }