private void Add_Click()
        {
            NewAppointmentWindow window = new NewAppointmentWindow();

            window.ShowDialog();
            UpdateTable();
        }
        private void BtnNewAppointment_Click(object sender, RoutedEventArgs e)
        {
            //Reset for new apppointment
            StateHelper.EditedAppointment       = null;
            StateHelper.IsEditedAppointmentMode = false;
            NewAppointmentWindow newAppointmentWindow = new NewAppointmentWindow();
            var result = newAppointmentWindow.ShowDialog();

            // When enter information successfully
            if (result.HasValue && result.Value)
            {
                scheduleViewModel.RefreshAppointments();
            }
        }
        private void BtnEditAppointment_Click(object sender, RoutedEventArgs e)
        {
            StateHelper.EditedAppointment = (Appointment)dgTimeSchedule.SelectedItem;
            if (StateHelper.EditedAppointment == null)
            {
                return;
            }

            NewAppointmentWindow newAppointmentWindow = new NewAppointmentWindow();

            StateHelper.EditedAppointment       = (Appointment)dgTimeSchedule.SelectedItem;
            StateHelper.IsEditedAppointmentMode = true;
            var result = newAppointmentWindow.ShowDialog();

            // When enter information successfully
            if (result.HasValue && result.Value)
            {
                scheduleViewModel.RefreshAppointments();
            }
        }