Hello,
I need to load appointment data and resources using datatable, Here I leave the code, the resources are loading, but the appointments are not loading, they help me that I am doing wrong..
SqlDataAdapter da = new SqlDataAdapter("Select ID, Summary, Start, End, RecurrenceRule,Location,Description, BackgroundId, StatusId From Appointments", DConexion.CnConexion);
DataTable dtAppointments = new DataTable();
da.Fill(dtAppointments);
SqlDataAdapter da1 = new SqlDataAdapter("SELECT IdPerson, Name, FROM Persons", DConexion.CnConexion);
DataTable dtResources = new DataTable();
da1.Fill(dtResources);
SchedulerBindingDataSource source = new SchedulerBindingDataSource();
AppointmentMappingInfo appointmentMappingInfo1 = new AppointmentMappingInfo();
appointmentMappingInfo1.BackgroundId = "BackgroundId";
appointmentMappingInfo1.Description = "Description";
appointmentMappingInfo1.End = "End";
appointmentMappingInfo1.Location = "Location";
appointmentMappingInfo1.RecurrenceRule = "RecurrenceRule";
appointmentMappingInfo1.ResourceId = "ResourceID";
appointmentMappingInfo1.Start = "Start";
appointmentMappingInfo1.StatusId = "StatusId";
appointmentMappingInfo1.Summary = "Summary";
appointmentMappingInfo1.UniqueId = "ID";
source.EventProvider.Mapping = appointmentMappingInfo1;
ResourceMappingInfo resourceMappingInfo1 = new ResourceMappingInfo();
resourceMappingInfo1.Id = "IdPerson";
resourceMappingInfo1.Name = "Name";
source.ResourceProvider.Mapping = resourceMappingInfo1;
source.EventProvider.DataSource = dtAppointments;
source.ResourceProvider.DataSource = dtResources;
this.radSchedulerCitas.DataSource = source;
I think I need to relate to the other AppointmentsResources table, if that's how I do it