コード例 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ComputingResourcesDataSet computingResourcesDataSet = ((ComputingResourcesDataSet)(this.FindResource("computingResourcesDataSet")));

            resources.Fill(computingResourcesDataSet.Resources);
            CollectionViewSource resourcesViewSource = ((CollectionViewSource)(this.FindResource("resourcesViewSource")));

            resourcesViewSource.View.MoveCurrentToFirst();
            buildResources();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: imaxmunguia/EjemploPracticos
        private void BindToDataSet()
        {
            if (this.schedulerDataSet == null)
            {
                this.schedulerDataSet = new SchedulerDataSet();

                this.appointmentsAdapter.Fill(this.schedulerDataSet.Appointments);

                ResourcesTableAdapter resourcesAdapter = new ResourcesTableAdapter();
                resourcesAdapter.Fill(this.schedulerDataSet.Resources);

                AppointmentsResourcesTableAdapter appointmentsResourcesAdapter = new AppointmentsResourcesTableAdapter();
                appointmentsResourcesAdapter.Fill(this.schedulerDataSet.AppointmentsResources);
            }

            SchedulerBindingDataSource dataSource = new SchedulerBindingDataSource();

            dataSource.EventProvider.AppointmentFactory = this.radSchedulerDemo.AppointmentFactory;

            AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo();

            appointmentMappingInfo.Mappings.Add(new SchedulerMapping("Email", "Email"));

            appointmentMappingInfo.UniqueId       = "ID";
            appointmentMappingInfo.Start          = "Start";
            appointmentMappingInfo.End            = "End";
            appointmentMappingInfo.Summary        = "Summary";
            appointmentMappingInfo.Description    = "Description";
            appointmentMappingInfo.Location       = "Location";
            appointmentMappingInfo.BackgroundId   = "BackgroundID";
            appointmentMappingInfo.StatusId       = "StatusID";
            appointmentMappingInfo.Resources      = "AppointmentsAppointmentsResources";
            appointmentMappingInfo.ResourceId     = "ResourceID";
            appointmentMappingInfo.RecurrenceRule = "RecurrenceRule";
            appointmentMappingInfo.Exceptions     = "AppointmentsAppointments";
            appointmentMappingInfo.MasterEventId  = "ParentID";
            appointmentMappingInfo.Visible        = "Visible";

            dataSource.EventProvider.Mapping    = appointmentMappingInfo;
            dataSource.EventProvider.DataSource = this.schedulerDataSet.Appointments;

            ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo();

            resourceMappingInfo.Id   = "ID";
            resourceMappingInfo.Name = "ResourceName";

            dataSource.ResourceProvider.Mapping    = resourceMappingInfo;
            dataSource.ResourceProvider.DataSource = this.schedulerDataSet.Resources;

            this.radSchedulerDemo.DataSource = dataSource;
        }
コード例 #3
0
        private void BindToDataSet()
        {
            if (this.schedulerDataSet == null)
            {
                this.schedulerDataSet = new SchedulerDataset();

                AppointmentsTableAdapter appointmentsAdapter = new AppointmentsTableAdapter();
                appointmentsAdapter.Fill(this.schedulerDataSet.Appointments);

                ResourcesTableAdapter resourcesAdapter = new ResourcesTableAdapter();
                resourcesAdapter.Fill(this.schedulerDataSet.Resources);

                TransientAppointmentsResourcesTableAdapter appointmentsResourcesAdapter = new TransientAppointmentsResourcesTableAdapter();
                appointmentsResourcesAdapter.Fill(this.schedulerDataSet.TransientAppointmentsResources);
            }

            SchedulerBindingDataSource dataSource             = new SchedulerBindingDataSource();
            AppointmentMappingInfo     appointmentMappingInfo = new AppointmentMappingInfo();

            appointmentMappingInfo.Start          = "Start";
            appointmentMappingInfo.End            = "End";
            appointmentMappingInfo.Summary        = "Summary";
            appointmentMappingInfo.Description    = "Description";
            appointmentMappingInfo.Location       = "Location";
            appointmentMappingInfo.BackgroundId   = "BackgroundID";
            appointmentMappingInfo.StatusId       = "StatusID";
            appointmentMappingInfo.Resources      = "Appointments_AppointmentsResources";
            appointmentMappingInfo.ResourceId     = "ResourceID";
            appointmentMappingInfo.RecurrenceRule = "RecurrenceRule";

            dataSource.EventProvider.Mapping    = appointmentMappingInfo;
            dataSource.EventProvider.DataSource = this.schedulerDataSet.Appointments;

            ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo();

            resourceMappingInfo.Id   = "ID";
            resourceMappingInfo.Name = "ResourceName";

            dataSource.ResourceProvider.Mapping    = resourceMappingInfo;
            dataSource.ResourceProvider.DataSource = this.schedulerDataSet.Resources;

            this.radSchedulerDemo.DataSource = dataSource;
        }