I want To Create dynamic Appointment list and dynamic Source Type in C# for my ScheduleView ,,
However: I already add dynamic Appointment and Resource with Resource Type ,,
But when i try to Assign resource-type to the Appointment I cant get it.
public ObservableCollection<Appointment> Appointments { get; set; }
public ObservableCollection<ResourceType> ResourceTypes { get; set; }
private void MakeResources()
{
ResourceTypes = new ObservableCollection<ResourceType>();
ResourceType rt = new ResourceType("Location");
rt.Resources.Add(new Resource("Hall A", "Location"));
rt.Resources.Add(new Resource("Hall B", "Location"));
rt.Resources.Add(new Resource("Hall C", "Location"));
ResourceTypes.Add(rt);
TestScheduleView.ResourceTypesSource=ResourceTypes
}
private void MakeAppointments()
{
Appointments = new ObservableCollection<Appointment>();
for ( int i = 0; i < 10; i++)
{
Appointments.Add(new Appointment()
{
Subject = "Appointment " + i.ToString(),
Start = DateTime.Now.AddHours(i),
End = DateTime.Now.AddHours(i).AddMinutes(30)
});
}
AppointmentsSource.Source=Appointments
}
The Appointement List is Appear in ShedulView but How I can add them under The
resource Type which I create?
I try to use
However: I already add dynamic Appointment and Resource with Resource Type ,,
But when i try to Assign resource-type to the Appointment I cant get it.
public ObservableCollection<Appointment> Appointments { get; set; }
public ObservableCollection<ResourceType> ResourceTypes { get; set; }
private void MakeResources()
{
ResourceTypes = new ObservableCollection<ResourceType>();
ResourceType rt = new ResourceType("Location");
rt.Resources.Add(new Resource("Hall A", "Location"));
rt.Resources.Add(new Resource("Hall B", "Location"));
rt.Resources.Add(new Resource("Hall C", "Location"));
ResourceTypes.Add(rt);
TestScheduleView.ResourceTypesSource=ResourceTypes
}
private void MakeAppointments()
{
Appointments = new ObservableCollection<Appointment>();
for ( int i = 0; i < 10; i++)
{
Appointments.Add(new Appointment()
{
Subject = "Appointment " + i.ToString(),
Start = DateTime.Now.AddHours(i),
End = DateTime.Now.AddHours(i).AddMinutes(30)
});
}
AppointmentsSource.Source=Appointments
}
The Appointement List is Appear in ShedulView but How I can add them under The
resource Type which I create?
I try to use