Declined
Last Updated: 21 Jan 2016 13:22 by ADMIN
ADMIN
Kalin
Created on: 28 Jan 2014 12:02
Category: ScheduleView
Type: Bug Report
1
New Appointment appears when editing an existing one and the default EditAppoinmentDialog is cancelled
It happens when the DefaultDialogResult is set to true.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Kalin
Posted on: 21 Jan 2016 13:22
Hi,

This is expected behavior due to the setting the DefaultDialogResult to true. It should be set to false when editing an appointment. Please use the approach demonstrated below:

private void ScheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
{
    var viewModel = e.DialogViewModel as AppointmentDialogViewModel;
    if (viewModel != null)
    {
        e.DefaultDialogResult = viewModel.ViewMode == AppointmentViewMode.Add;
    }

    e.Cancel = true;
    e.Handled = true;
}

Regards,
Kalin