Custom Provider & Schedules Object - Help |
Post Reply |
Author | |
vbuser
Newbie Joined: 22 January 2004 Status: Offline Points: 39 |
Post Options
Thanks(0)
Posted: 20 November 2007 at 11:40am |
I'm using a CustomProvider, how do you load the schedules? This is how I'm doing it:
Set rs = cnADO.Execute(sSQL, adCmdText)
If Not (rs.BOF And rs.eof) Then rs.MoveFirst Do While Not rs.eof i = i + 1 ReDim Preserve pRes(i) Set pRes(i) = New CalendarResource If i = 0 Then pRes(i).SetDataProvider2 strConnectionString, True Else pRes(i).SetDataProvider CalendarControl1.DataProvider, False End If 'add the schedule to the resource
pRes(i).Name = rs!ShortName & "" pRes(i).ScheduleIDs.Add rs!EmployeeNo & "" 'add resource to resource array arResources.Add pRes(i) rs.MoveNext Loop End If rs.Close Set rs = Nothing 'add resource array to calendarcontrol
CalendarControl1.SetMultipleResources arResources They showup OK on the calendar, but when I add an event the following code does not work:
'Fill schedules combobox
Dim pSchedule As CalendarSchedule For Each pSchedule In frmPaneScheduler.CalendarControl1.DataProvider.Schedules cboSchedule.AddItem pSchedule.Name cboSchedule.ItemData(cboSchedule.NewIndex) = pSchedule.ID Next any help will be appreciate it! Thank you
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |