public string ShowInfo() { StringBuilder textResult = new StringBuilder(); textResult.AppendLine($"Appointment Id: {AppId}"); textResult.AppendLine($"Date: {AppointmentDate.ToShortDateString()}"); textResult.AppendLine($"Time: {AppointmentTime.ToShortTimeString()}"); textResult.AppendLine($"Room: {MeetingRoom}"); textResult.AppendLine($"Lawyer's ID: {LawyerId}"); textResult.AppendLine($"Client's ID: {ClientId}"); textResult.AppendLine("*************************"); return(textResult.ToString()); }
public override string ToString() { if (String.IsNullOrEmpty(Description)) { if (String.IsNullOrEmpty(Title)) { return($"{AppointmentDate.ToShortDateString()} {AppointmentDate.ToShortTimeString()}"); } return(Title); } if (String.IsNullOrEmpty(Title)) { return(Description); } return($"{Title} - {Description}"); }
/*------------------------------------------------------------------------------*/ //Methods: public override string ToString() { return(AppointmentDate.ToShortDateString()); }
} = ""; //decided that time should be separate field. public override string ToString() { return($"{Title} on {AppointmentDate.ToShortDateString()}. Reminder at {ReminderTime} "); }