This is a migrated thread and some comments may be shown as answers.

Resource information did not save

1 Answer 72 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Dave Mortgatta
Top achievements
Rank 1
Dave Mortgatta asked on 17 Apr 2012, 06:06 PM

Hi,
I am having an issue to save data to database.

I used code below to bind data from database and save information into database as needed.

but Resource field, it did not save the information at all. for example, user books new appointment and choose resource: Laptop and clicks save, but when user come back, resouce field went to None.

Please help and kindly regard.

'load event...
Me.SchedulerDataDataSet1 = New SchedulerDataDataSet()
Dim appointmentsAdapter As New AppointmentsTableAdapter()
appointmentsAdapter.Fill(Me.SchedulerDataDataSet1.Appointments)
Dim resourcesAdapter As New ResourcesTableAdapter()
resourcesAdapter.Fill(Me.SchedulerDataDataSet1.Resources)
Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Fill(Me.SchedulerDataDataSet1.AppointmentsResources)
Dim dataSource As New SchedulerBindingDataSource()
Dim appointmentMappingInfo As 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 = Me.SchedulerDataDataSet1.Appointments

Dim resourceMappingInfo As New ResourceMappingInfo()
resourceMappingInfo.Id = "ID"
resourceMappingInfo.Name = "Name"

dataSource.ResourceProvider.Mapping = resourceMappingInfo
dataSource.ResourceProvider.DataSource = Me.SchedulerDataDataSet1.Resources

Me.RadScheduler1.DataSource = dataSource

'Save data...
Dim appointmentsAdapter As New AppointmentsTableAdapter()
appointmentsAdapter.Update(Me.SchedulerDataDataSet1.Appointments)

Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Update(Me.SchedulerDataDataSet1.AppointmentsResources)

1 Answer, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 20 Apr 2012, 03:36 PM
Hi Dave,

Thank you for contacting us.

At the bottom of this help article there is a section that demonstrates how to save appointments. Please try saving the appointments as described there. If this does not help, please open a new support ticket and send us a sample project and a database script so I can reproduce the scenario locally. This will allow me to investigate your code and isolate the reason for this behavior.

Please let me know if you need further help.

All the best,
Ivan Todorov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
Scheduler and Reminder
Asked by
Dave Mortgatta
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
Share this question
or