コード例 #1
0
        private void RadScheduleView_ShowDialog(object sender, ShowDialogEventArgs e)
        {
            if (e.DialogViewModel is AppointmentDialogViewModel)
            {
                e.Cancel = true;
                if (Properties.Settings.Default.Role != "Support Staff" && Properties.Settings.Default.Role != "Employee")
                {
                    if (scheduleView.SelectedSlot != null)
                    {
                        Slot selectedSlot = scheduleView.SelectedSlot;
                        UserControl_AddSchedule addSchd = new UserControl_AddSchedule(selectedSlot, this);
                        addSchd.ShowDialog();
                    }

                    else if (scheduleView.SelectedAppointment != null)
                    {
                        IOccurrence sel = scheduleView.SelectedAppointment;
                        Appointment selectedAppt = sel as Appointment;
                        UserControl_AddSchedule addSchd = new UserControl_AddSchedule(selectedAppt, this);
                        addSchd.ShowDialog();
                    }
                }
            }

            if (e.DialogViewModel is ConfirmDialogViewModel)
            {
                e.DefaultDialogResult = false;
                e.Cancel = true;
            }

            var dialogViewModel = e.DialogViewModel as RecurrenceChoiceDialogViewModel;
            if (dialogViewModel != null)
            {
                dialogViewModel.IsSeriesModeSelected = true;
            }
        }
コード例 #2
0
        void Schedule_AddButton_Click(object sender, RoutedEventArgs e)
        {
            Slot selectedSlot = scheduleView.SelectedSlot;
            UserControl_AddSchedule addSchd = new UserControl_AddSchedule(selectedSlot, this);

            addSchd.ShowDialog();
        }
コード例 #3
0
        void Schedule_EditButton_Click(object sender, RoutedEventArgs e)
        {
            IOccurrence sel = scheduleView.SelectedAppointment;
            Appointment selectedAppt = sel as Appointment;
            UserControl_AddSchedule addSchd = new UserControl_AddSchedule(selectedAppt, this);

            addSchd.ShowDialog();
        }