Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Add a resource belong to a contact (Read 1924 times)
bigloser
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Jul 25th, 2006
Add a resource belong to a contact
Jul 25th, 2006 at 11:24pm
Print Post  
I'm a Chinese user,so  maybe my English is not very good.

Now, the calendar is in ResourceView Mode, and is GroupByContact. I can add different contacts into it by myself, but I cann't add a resource into it. Because I don't know how to bind a resource to a contact.

As I can see in demo, in resource view, a resource can be added into the Schedule,but I don't know how to do it.

Would you mind telling me the method? Thank you
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Add a resource belong to a contact
Reply #1 - Jul 26th, 2006 at 4:39am
Print Post  
Resources in the resource view are actually Appointments, i.e. you can create a "resource" item in the resource view and bind it to a particular contact, by actually creating a new Appointment object. The following code illustrates how to do this:

Code
Select All
Appointment resource = new Appointment();
resource.StartTime = time1;
resource.EndTime = time2;
resource.Contacts.Add(relatedContact);
calendar.Schedule.Items.Add(resource); 



In the code above time1, time2, relatedContact and calendar are previously initialized variables.

Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint