Пример #1
0
        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());
        }
Пример #2
0
        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}");
        }
Пример #3
0
 /*------------------------------------------------------------------------------*/
 //Methods:
 public override string ToString()
 {
     return(AppointmentDate.ToShortDateString());
 }
Пример #4
0
 } = "";                                        //decided that time should be separate field.
 public override string ToString()
 {
     return($"{Title} on {AppointmentDate.ToShortDateString()}.  Reminder at {ReminderTime} ");
 }