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);
         }
     }
 }
예제 #2
0
 public void CreateNewTicket(LoginToken <Administrator> token, Tickets ticket)
 {
     if (token != null)
     {
         if (_ticketDAO != null)
         {
             _ticketDAO.Add(ticket);
         }
         else
         {
             _ticketDAO = new TicketsDAOPGSQL();
             _ticketDAO.Add(ticket);
         }
     }
 }
예제 #3
0
        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);
        }