Пример #1
0
        static void UpdateAppointment()
        {
            CarScheduling insertedAppt = SchedulerExtension.GetAppointmentToInsert <CarScheduling>(
                SchedulerHelper.Settings,
                SchedulerDataHelper.GetAppointments(),
                SchedulerDataHelper.GetResources()
                );

            SchedulerDataHelper.InsertAppointment(insertedAppt);

            CarScheduling[] updatedAppt = SchedulerExtension.GetAppointmentsToUpdate <CarScheduling>(
                SchedulerHelper.Settings,
                SchedulerDataHelper.GetAppointments(),
                SchedulerDataHelper.GetResources()
                );
            foreach (var appt in updatedAppt)
            {
                SchedulerDataHelper.UpdateAppointment(appt);
            }

            CarScheduling[] removedAppt = SchedulerExtension.GetAppointmentsToRemove <CarScheduling>(
                SchedulerHelper.Settings,
                SchedulerDataHelper.GetAppointments(),
                SchedulerDataHelper.GetResources()
                );
            foreach (var appt in removedAppt)
            {
                SchedulerDataHelper.RemoveAppointment(appt);
            }
        }
        static void UpdateAppointment()
        {
            EFAppointment insertedAppt = SchedulerExtension.GetAppointmentToInsert <EFAppointment>(
                SchedulerSettingsHelper.CommonSchedulerSettings,
                SchedulerDataHelper.GetAppointments(), SchedulerDataHelper.GetResources());

            SchedulerDataHelper.InsertAppointment(insertedAppt);

            EFAppointment[] updatedAppt = SchedulerExtension.GetAppointmentsToUpdate <EFAppointment>(
                SchedulerSettingsHelper.CommonSchedulerSettings,
                SchedulerDataHelper.GetAppointments(), SchedulerDataHelper.GetResources());
            foreach (var appt in updatedAppt)
            {
                SchedulerDataHelper.UpdateAppointment(appt);
            }

            EFAppointment[] removedAppt = SchedulerExtension.GetAppointmentsToRemove <EFAppointment>(
                SchedulerSettingsHelper.CommonSchedulerSettings,
                SchedulerDataHelper.GetAppointments(), SchedulerDataHelper.GetResources());
            foreach (var appt in removedAppt)
            {
                SchedulerDataHelper.RemoveAppointment(appt);
            }
        }
Пример #3
0
        void UpdateAppointment()
        {
            ScheduleCalendar insertedAppt = SchedulerExtension.GetAppointmentToInsert <ScheduleCalendar>("scheduler", SchedulerDataHelper.GetAppointments(),
                                                                                                         SchedulerDataHelper.GetResources(), SchedulerDataHelper.DefaultAppointmentStorage, SchedulerDataHelper.DefaultResourceStorage);

            SchedulerDataHelper.InsertAppointment(insertedAppt);

            ViewData["EditableSchedule"] = insertedAppt;

            ScheduleCalendar[] updatedAppt = SchedulerExtension.GetAppointmentsToUpdate <ScheduleCalendar>("scheduler", SchedulerDataHelper.GetAppointments(),
                                                                                                           SchedulerDataHelper.GetResources(), SchedulerDataHelper.DefaultAppointmentStorage, SchedulerDataHelper.DefaultResourceStorage);
            foreach (var appt in updatedAppt)
            {
                SchedulerDataHelper.UpdateAppointment(appt);
            }

            ScheduleCalendar[] removedAppt = SchedulerExtension.GetAppointmentsToRemove <ScheduleCalendar>("scheduler", SchedulerDataHelper.GetAppointments(),
                                                                                                           SchedulerDataHelper.GetResources(), SchedulerDataHelper.DefaultAppointmentStorage, SchedulerDataHelper.DefaultResourceStorage);
            foreach (var appt in removedAppt)
            {
                SchedulerDataHelper.RemoveAppointment(appt);
            }
        }
        static void UpdateAppointment()
        {
            DBAppointment[] insertedAppointments = SchedulerExtension.GetAppointmentsToInsert <DBAppointment>("scheduler", SchedulerDataHelper.GetAppointments(),
                                                                                                              SchedulerDataHelper.GetResources(), SchedulerStorageProvider.DefaultAppointmentStorage, SchedulerStorageProvider.DefaultResourceStorage);
            foreach (var appt in insertedAppointments)
            {
                AppointmentDataAccessor.InsertAppointment(appt);
            }

            DBAppointment[] updatedAppointments = SchedulerExtension.GetAppointmentsToUpdate <DBAppointment>("scheduler", SchedulerDataHelper.GetAppointments(),
                                                                                                             SchedulerDataHelper.GetResources(), SchedulerStorageProvider.DefaultAppointmentStorage, SchedulerStorageProvider.DefaultResourceStorage);
            foreach (var appt in updatedAppointments)
            {
                AppointmentDataAccessor.UpdateAppointment(appt);
            }

            DBAppointment[] removedAppointments = SchedulerExtension.GetAppointmentsToRemove <DBAppointment>("scheduler", SchedulerDataHelper.GetAppointments(),
                                                                                                             SchedulerDataHelper.GetResources(), SchedulerStorageProvider.DefaultAppointmentStorage, SchedulerStorageProvider.DefaultResourceStorage);
            foreach (var appt in removedAppointments)
            {
                AppointmentDataAccessor.RemoveAppointment(appt);
            }
        }
        static void UpdateAppointment()
        {
            DBAppointment[] insertedAppt = SchedulerExtension.GetAppointmentsToInsert <DBAppointment>(SchedulerSettingsHelper.CommonSchedulerSettings,
                                                                                                      SchedulerDataHelper.FetchAppointmentsHelperMethod,
                                                                                                      SchedulerDataHelper.GetResources());
            foreach (var appt in insertedAppt)
            {
                SchedulerDataHelper.InsertAppointment(appt);
            }

            DBAppointment[] updatedAppt = SchedulerExtension.GetAppointmentsToUpdate <DBAppointment>(SchedulerSettingsHelper.CommonSchedulerSettings,
                                                                                                     SchedulerDataHelper.FetchAppointmentsHelperMethod,
                                                                                                     SchedulerDataHelper.GetResources());

            foreach (var appt in updatedAppt)
            {
                SchedulerDataHelper.UpdateAppointment(appt);
            }

            DBAppointment[] removedAppt = SchedulerExtension.GetAppointmentsToRemove <DBAppointment>(SchedulerSettingsHelper.CommonSchedulerSettings,
                                                                                                     SchedulerDataHelper.FetchAppointmentsHelperMethod,
                                                                                                     SchedulerDataHelper.GetResources());
            foreach (var appt in removedAppt)
            {
                SchedulerDataHelper.RemoveAppointment(appt);
            }
        }