public void UpdateCustomerDetails(LoginToken <Administrator> token, Customer customer) { CheckToken(token); customerDAO.Update(customer); Logger.Log(LogLevel.Info, $"The administrator updated the customer account of '{customer.GetFullName()}'."); }
public void RemoveCustomer(LoginToken <Administrator> token, Customer customer) { CheckToken(token); customerDAO.Remove(customer.Id); Logger.Log(LogLevel.Info, $"The administrator removed the customer account of '{customer.GetFullName()}'."); }
public void UpdateAirlineDetails(LoginToken <Administrator> token, AirlineCompany airline) { CheckToken(token); airlineDAO.Update(airline); Logger.Log(LogLevel.Info, $"The administrator updated the airline account of '{airline.Name}'."); }
public void CreateNewCustomer(LoginToken <Administrator> token, Customer customer) { CheckToken(token); customerDAO.Add(customer); Logger.Log(LogLevel.Info, $"The administrator created a new customer account for '{customer.GetFullName()}'."); }
public void RemoveAirline(LoginToken <Administrator> token, AirlineCompany airline) { CheckToken(token); airlineDAO.Remove(airline.Id); Logger.Log(LogLevel.Info, $"The administrator removed the airline company account of '{airline.Name}'."); }
public IList <AirlineCompany> GetAllAirlinesFromRegisterQueue(LoginToken <Administrator> token) { CheckToken(token); Logger.Log(LogLevel.Info, "A list of all airline companies was requested by the administrator"); return(airlineRedisDAO.GetAll()); }
public IList <Ticket> GetAllTickets(LoginToken <AirlineCompany> token) { CheckToken(token); Logger.Log(LogLevel.Info, $"A list of all airline's flight tickets was requested by '{token.User.Name}'."); return(ticketDAO.GetTicketsByAirlineId(token.User.Id)); }
public IList <JObject> GetAllMyFlightsJson(LoginToken <Customer> token) { CheckToken(token); Logger.Log(LogLevel.Info, $"A list of customer's flights was requested by '{token.User.GetFullName()}'."); return(flightDAO.GetJsonFlightsByCustomer(token.User)); }
public void PurchaseTicket(LoginToken <Customer> token, int flightId) { CheckToken(token); ticketDAO.Add(new Ticket(flightId, token.User.Id)); Logger.Log(LogLevel.Info, $"The customer '{token.User.GetFullName()}' has bought a ticket for flight {flightId}."); }
public void CreateAirline(LoginToken <Administrator> token, Airline airline) { }
public void CancelTicket(LoginToken <Customer> token, int ticketId) { CheckToken(token); ticketDAO.Remove(ticketId); Logger.Log(LogLevel.Info, $"The customer '{token.User.GetFullName()}' has canceled the flight ticket {ticketId}."); }
public void CancelFlight(LoginToken <AirlineCompany> token, int flightId) { CheckToken(token); flightDAO.Remove(flightId); Logger.Log(LogLevel.Info, $"The airline company '{token.User.Name}' has canceled flight {flightId}."); }
public void UpdateFlight(LoginToken <AirlineCompany> token, Flight flight) { CheckToken(token); flightDAO.Update(flight); Logger.Log(LogLevel.Info, $"The airline company '{token.User.Name}' has updated flight {flight.Id}."); }
public void ModifyAirlineDetails(LoginToken <AirlineCompany> token, AirlineCompany airline) { CheckToken(token); airlineDAO.Update(airline); Logger.Log(LogLevel.Info, $"The airline company '{token.User.Name}' has updated its details."); }
public IList <Customer> GetAllCustomers(LoginToken <Administrator> token) { CheckToken(token); Logger.Log(LogLevel.Info, "A list of all customers was requested by the administrator"); return(customerDAO.GetAll()); }
public void ModifyCustomerDetails(LoginToken <Customer> token, Customer customer) { CheckToken(token); customerDAO.Update(customer); Logger.Log(LogLevel.Info, $"The customer '{token.User.GetFullName()}' has updated its details."); }
public IList <Ticket> GetAllTickets(LoginToken <Administrator> token) { CheckToken(token); Logger.Log(LogLevel.Info, "A list of all flight tickets was requested by the administrator"); return(ticketDAO.GetAll()); }
public void CreateNewAirline(LoginToken <Administrator> token, AirlineCompany airline) { CheckToken(token); airlineDAO.Add(airline); Logger.Log(LogLevel.Info, $"The airline company '{airline.Name}' was aprroved by the administrator and an account was created for it"); }
public void RemoveAirlineFromRegisterQueue(LoginToken <Administrator> token, AirlineCompany airline) { CheckToken(token); airlineRedisDAO.Remove(airline); }
public void CreateFlight(LoginToken <AirlineCompany> token, Flight flight) { CheckToken(token); flightDAO.Add(flight); Logger.Log(LogLevel.Info, $"The airline company '{token.User.Name}' created a new flight."); }