public void UpdateCustomerDetails(LoginToken <Administrator> token, Customer customer) { if (token.IsTokenValid()) { _customerDAO.Update(customer); } else { throw new TokenNotValidException(); } }
public void RemoveCustomer(LoginToken <Administrator> token, Customer customer) { if (token.IsTokenValid()) { _customerDAO.Remove(customer); } else { throw new TokenNotValidException(); } }
public void UpdateAirlineDetails(LoginToken <Administrator> token, AirlineCompany customer) { if (token.IsTokenValid()) { _airlineDAO.Update(customer); } else { throw new TokenNotValidException(); } }
public void RemoveAirline(LoginToken <Administrator> token, AirlineCompany airline) { if (token.IsTokenValid()) { _airlineDAO.Remove(airline); } else { throw new TokenNotValidException(); } }
public void ModifyAirlineDetails(LoginToken<AirlineCompany> token, AirlineCompany airline) { if (token.IsTokenValid()) { _airlineDAO.Update(airline); } else { throw new TokenNotValidException(); } }
public void UpdateFlight(LoginToken<AirlineCompany> token, Flight flight) { if (token.IsTokenValid()) { _flightDAO.Update(flight); } else { throw new TokenNotValidException(); } }
public void CancelTicket(LoginToken <Customer> token, Ticket ticket) { if (token.IsTokenValid()) { _ticketDAO.Remove(ticket); } else { throw new TokenNotValidException(); } }
public IList <Flight> GetAllMyFlights(LoginToken <Customer> token) { if (token.IsTokenValid()) { return(_flightDAO.GetFlightsByCustomer(token.User)); } else { throw new TokenNotValidException(); } }
public void ChangeMyPassword(LoginToken<AirlineCompany> token, string oldPassword, string newPassword) { var service = new LoginService(_airlineDAO,_customerDAO); if (token.IsTokenValid()) { service.ChangeAirlinePassword(token,oldPassword,newPassword); } else { throw new TokenNotValidException(); } }