public string DeleteTrainTicket(string from, string to, DateTime dateTime) { TrainTicket ticket = new TrainTicket(from, to, dateTime); string result = this.DeleteTicket(ticket); if (result.Contains("deleted")) { this.trainTicketsCount--; } return result; }
public string AddTrainTicket(string from, string to, DateTime dateTime, decimal ticketPrice, decimal studentTicketPrice) { TrainTicket ticket = new TrainTicket(from, to, dateTime, ticketPrice, studentTicketPrice); string result = this.AddTicket(ticket); if (result.Contains("created")) { this.trainTicketsCount++; } return result; }