Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - multiple schedules
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

multiple schedules

 Post Reply Post Reply
Author
Message
nigelgomm View Drop Down
Newbie
Newbie


Joined: 25 June 2012
Location: Canada
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote nigelgomm Quote  Post ReplyReply Direct Link To This Post Topic: multiple schedules
    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


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.