scheduleResourceTypeCollection.Add(new ResourceType() { TypeName = " Employee " });
ScheduleAppointmentModel appointment1 = new ScheduleAppointmentModel() { StartTime = DateTime.Now.AddHours(5), EndTime = DateTime.Now.AddHours(6), SubjectMapping = "Johny's Appointment", }; appointment1.Resources.Add(new MappedResource() { MappedTypeName = "Employee", MappedResourceName = "Johny", MappedDisplayName = "Johny" }); ScheduleAppointmentModel appointment2 = new ScheduleAppointmentModel() { StartTime = DateTime.Now.AddHours(6), EndTime = DateTime.Now.AddHours(7), SubjectMapping = "Neal's Appointment" }; appointment2.Resources.Add(new MappedResource() { MappedTypeName = " Employee ", MappedResourceName = "Neal", MappedDisplayName = "Neal" });
ScheduleAppointmentModel appointment3 = new ScheduleAppointmentModel()
{ StartTime = DateTime.Now.AddDays(2).AddHours(7), EndTime = DateTime.Now.AddDays(2).AddHours(8), SubjectMapping = "Peter's Appointment" }; appointment3.Resources.Add(new MappedResource() { MappedTypeName = " Employee ", MappedResourceName = "Peter", MappedDisplayName = "Peter" });
scheduleAppointmentCollection.Add(appointment1); scheduleAppointmentCollection.Add(appointment2); scheduleAppointmentCollection.Add(appointment3); ScheduleResourceTypeCollection[0].ResourceCollection.Add(appointment1.Resources[0]); ScheduleResourceTypeCollection[0].ResourceCollection.Add(appointment2.Resources[0]); ScheduleResourceTypeCollection[0].ResourceCollection.Add(appointment3.Resources[0]); |