private void LoadAppointmentDetails()
        {
            Guid projectId = DataConstants.DummyGuid;

            _hdnProjectId.Value = Convert.ToString(DataConstants.DummyGuid);
            if (_hdnAppointmentId.Value.Trim().Length > 0)
            {
                DiaryServiceClient diaryService = new DiaryServiceClient();
                try
                {
                    AppointmentReturnValue appointmentReturnValue = new AppointmentReturnValue();
                    appointmentReturnValue = diaryService.GetAppointmentDetails(_logonSettings.LogonId, Convert.ToInt32(_hdnAppointmentId.Value));

                    if (appointmentReturnValue.Success)
                    {
                        if (appointmentReturnValue != null)
                        {
                            _txtAttendees.Text            = appointmentReturnValue.Appointment.AttendeesName;
                            _hdnAttendeesMemberId.Value   = appointmentReturnValue.Appointment.Attendees;
                            _AppointmentOU.CurrentUsers   = appointmentReturnValue.Appointment.AttendeesName;
                            _AppointmentOU.CurrentUsersID = appointmentReturnValue.Appointment.Attendees;
                            _txtSubject.Text = appointmentReturnValue.Appointment.Subject;
                            _ssAppointmentVenue.ServiceText = appointmentReturnValue.Appointment.VenueText;
                            _hdnVenueId.Value     = Convert.ToString(appointmentReturnValue.Appointment.VenueId);
                            _ccDate.DateText      = Convert.ToString(appointmentReturnValue.Appointment.StartDate);
                            _tcStartTime.TimeText = appointmentReturnValue.Appointment.StartTime;
                            _tcEndTime.TimeText   = appointmentReturnValue.Appointment.EndTime;

                            _chkReminder.Checked = appointmentReturnValue.Appointment.IsReminderSet;

                            if (appointmentReturnValue.Appointment.IsReminderSet)
                            {
                                _ddlReminder.SelectedIndex = -1;
                                if (_ddlReminder.Items.FindByValue(appointmentReturnValue.Appointment.ReminderType) != null)
                                {
                                    _ddlReminder.Items.FindByValue(appointmentReturnValue.Appointment.ReminderType).Selected = true;
                                }

                                _ddlReminderBeforeTime.SelectedIndex = -1;
                                if (_ddlReminderBeforeTime.Items.FindByValue(appointmentReturnValue.Appointment.ReminderBeforeTime) != null)
                                {
                                    _ddlReminderBeforeTime.Items.FindByValue(appointmentReturnValue.Appointment.ReminderBeforeTime).Selected = true;
                                }

                                if (appointmentReturnValue.Appointment.ReminderType == "On")
                                {
                                    _tdReminderOn.Style["display"]     = "";
                                    _tdReminderBefore.Style["display"] = "none";
                                }
                                else
                                {
                                    _tdReminderOn.Style["display"]     = "none";
                                    _tdReminderBefore.Style["display"] = "";
                                }

                                _ccReminderDate.DateText = Convert.ToString(appointmentReturnValue.Appointment.ReminderDate);
                                _tcReminderTime.TimeText = appointmentReturnValue.Appointment.ReminderTime;
                            }
                            else
                            {
                                _ddlReminder.SelectedIndex           = -1;
                                _ddlReminderBeforeTime.SelectedIndex = -1;
                                _ccReminderDate.DateText             = string.Empty;
                                _tcReminderTime.TimeText             = string.Empty;
                            }

                            _txtNotes.Text = appointmentReturnValue.Appointment.Notes;

                            projectId           = appointmentReturnValue.Appointment.ProjectId;
                            _hdnProjectId.Value = Convert.ToString(projectId);

                            HideUnhideReminderControls();
                        }
                        else
                        {
                            throw new Exception("Load failed.");
                        }
                    }
                    else
                    {
                        throw new Exception(appointmentReturnValue.Message);
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (diaryService.State != System.ServiceModel.CommunicationState.Faulted)
                    {
                        diaryService.Close();
                    }
                }

                try
                {
                    if (projectId != DataConstants.DummyGuid)
                    {
                        _cliMatDetails.ProjectId = projectId;
                        LoadClientMatterDetails(projectId);
                    }
                    else
                    {
                        _cliMatDetails.LoadData = false;
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }