示例#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());
        }
        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} ");
 }