/// <summary> /// Searches for reservation of <paramref name="person"/>. /// </summary> /// <param name="person"></param> private void SearchAndWriteData(PersonInfo person) { Reservations = Person.GetAllReservationsForPerson().ToList(); var sb = new StringBuilder(); sb.AppendLine($"Email: {Person.Email}"); sb.AppendLine($"Name: {Person.FirstName} {person.LastName}"); sb.AppendLine($"Date of birth: {Person.DateOfBirth:dd.MM.yyyy}"); sb.AppendLine("Reservations:"); Reservations.ForEach(reservation => AppendReservation(ref sb, reservation)); dataTextBox.Text = sb.ToString(); }