public void CancelTicket(LoginToken <Customers> token, Tickets ticket) { if (token != null) { if (_ticketDAO != null) { _ticketDAO.Remove(ticket.ID); } else { _ticketDAO = new TicketsDAOPGSQL(); _ticketDAO.Remove(ticket.ID); } } }
public void CreateNewTicket(LoginToken <Administrator> token, Tickets ticket) { if (token != null) { if (_ticketDAO != null) { _ticketDAO.Add(ticket); } else { _ticketDAO = new TicketsDAOPGSQL(); _ticketDAO.Add(ticket); } } }
public IList <Tickets> GetAllTickets(LoginToken <AirlineCompanies> token) { List <Tickets> tickets = new List <Tickets>(); if (token != null) { if (_ticketDAO != null) { tickets = _ticketDAO.GetAll(); } else { _ticketDAO = new TicketsDAOPGSQL(); tickets = _ticketDAO.GetAll(); } } return(tickets); }