Print Page | Close Window

multiple schedules

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=22350
Printed Date: 11 December 2024 at 6:33pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: multiple schedules
Posted By: nigelgomm
Subject: multiple schedules
Date Posted: 07 July 2014 at 10:35am
working with some test code in visual foxpro trying to add an appointment to a schedule.
The following gives me the two columns in the dayview but the appointment doesn't show. What am i missing?

loCalendar = THISFORM.olecontrol1

loRess = CREATEOBJECT("codejock.calendarresources.15.1.3")
loSchedules = loCalendar.dataprovider.schedules

loSchedules.addnewschedule("Fred")
lox = CREATEOBJECT("codejock.calendarresource.15.1.3")
lox.NAME = "Fred"
lox.ScheduleIDs.ADD(loSchedules.ITEM(loSchedules.COUNT-1).ID)
loRess.ADD(lox)

loSchedules.addnewschedule("Bert")
lox = CREATEOBJECT("codejock.calendarresource.15.1.3")
lox.NAME = "Bert"
lox.ScheduleIDs.ADD(loSchedules.ITEM(loSchedules.COUNT-1).ID)
loRess.ADD(lox)


loNewEvent = loCalendar.dataprovider.CreateEvent()
loNewEvent.scheduleid = loSchedules.ITEM(1).ID
loNewEvent.starttime = DATETIME()
loNewEvent.endtime = DATETIME()+(30*60)
loNewEvent.subject = "testing"
loCalendar.dataprovider.AddEvent(loNewEvent)
loCalendar.SetMultipleResources(loRess)
loCalendar.populate()
loCalendar.ActiveView.ShowDay(DATE())


thanks

nigel





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net