public void CumparaBilete(int idConcert, string numeClient, int nrBilete) { countBilete++; int nrLocuriOcup = cr.findOne(idConcert).NrLocuriVandute + nrBilete; Bilet b = new Bilet(countBilete, numeClient, idConcert, nrBilete); br.saveBilet(b); }
public void SellBilet(Bilet b) { try { Console.WriteLine("Selling ticket in ServiceReal.cs"); biletRepo.saveBilet(b); int nrLocuriNou = b.Seats + concertRepo.findOne(b.ConcertID).Seats; concertRepo.updateLocuriLibere(b.ConcertID, nrLocuriNou); List <ConcertDTO> L = concertRepo.cautaConcerteDetalii(); L.Where(x => x.ConcertID == b.ConcertID) .ToList() .ForEach(x => Console.WriteLine(x.ToString())); notifyClients(); } catch (Exception e) { Console.WriteLine(e.Message); } }