Beispiel #1
0
 public void ticketSold(int showID)
 {
     ServicesLayer.Models.ShowModel ticket = getAll().Find(x => x.ID == showID);
     if (ticket.NumberOfTickets != 0)
     {
         ticket.NumberOfTickets--;
     }
     update(ticket.ID, ticket.Title, ticket.Genre, ticket.Distribution, ticket.Date, ticket.NumberOfTickets);
 }
Beispiel #2
0
 public DataLayer.Models.ShowDTO map(ServicesLayer.Models.ShowModel model)
 {
     DataLayer.Models.ShowDTO dto = new DataLayer.Models.ShowDTO();
     dto.ID              = model.ID;
     dto.Title           = model.Title;
     dto.Genre           = model.Genre;
     dto.Distribution    = model.Distribution;
     dto.Date            = model.Date;
     dto.NumberOfTickets = model.NumberOfTickets;
     return(dto);
 }
Beispiel #3
0
 public ServicesLayer.Models.ShowModel map(DataLayer.Models.ShowDTO dto)
 {
     ServicesLayer.Models.ShowModel model = new ServicesLayer.Models.ShowModel();
     model.ID              = dto.ID;
     model.Title           = dto.Title;
     model.Genre           = dto.Genre;
     model.Distribution    = dto.Distribution;
     model.Date            = dto.Date;
     model.NumberOfTickets = dto.NumberOfTickets;
     return(model);
 }