예제 #1
0
        protected internal virtual void OnOkButton()
        {
            if (!ValidateDateAndTime())
            {
                return;
            }
            if (!SaveFormData(Controller.EditedAppointmentCopy))
            {
                return;
            }
            if (!Controller.IsConflictResolved())
            {
                ShowMessageBox(SchedulerLocalizer.GetString(SchedulerStringId.Msg_Conflict), Controller.GetMessageBoxCaption(SchedulerStringId.Msg_Conflict), MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            if (Controller.IsAppointmentChanged() || Controller.IsNewAppointment || IsAppointmentChanged(Controller.EditedAppointmentCopy))
            {
                Controller.ApplyChanges();
            }

            this.DialogResult = DialogResult.OK;
        }