Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Saving contacts asociated to an appointment (Read 5537 times)
Fernando Castro
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Apr 5th, 2012
Saving contacts asociated to an appointment
Apr 5th, 2012 at 3:51am
Print Post  
I have this problem... i save the schedule to a XML file, this schedule has apointments with contacts asociateds... i can see the contacts on the xml file. There is no problem for saving. But, when i load whe showform (edit) to see the appointment, the contacts asociated are not shown on the edit form. I think i need a Javascript function to show the contacts asociated to the appointment. Can you provide me an example of this?
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Saving contacts asociated to an appointment
Reply #1 - Apr 5th, 2012 at 7:21am
Print Post  
Hi,
Are you associating the contacts only with the appointments?

The contacts and other resources have to be present in the respective Calendar.Schedule collection (e.g. Calendar.Schedule.Contacts for contacts) in order to be properly associated with appointments.
The next example shows how to do that:
Code
Select All
// Create two contacts and add them to the Schedule.
Contact c1 = new Contact();
c1.FirstName = "John";
c1.LastName = "Doe";
Calendar1.Schedule.Contacts.Add(c1);

Contact c2 = new Contact();
c2.FirstName = "Jill";
c2.LastName = "Doe";
Calendar1.Schedule.Contacts.Add(c2);

// Assign the second contact to a predefined appointment.
appointment.Contacts.Add(c2);
 



In my test after calling SaveToXml and then LoadFromXml for this schedule, the contacts list in the appointment's edit form displays two contacts, with the second being selected.

Let me know if this helps.

Lyubo
  
Back to top
 
IP Logged
 
Fernando Castro
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Apr 5th, 2012
Re: Saving contacts asociated to an appointment
Reply #2 - Apr 5th, 2012 at 2:38pm
Print Post  
Thanks for the answer...

I have the autopostback=true on the calendar control.
If I put the autopostback=false then the location and asociated contacts are shown when i edit the event.
If i put autopostback=true the contacts and location are not shown when i edit de event.... so the solution will be put autopostback=false... ok... but if i do this... how do I save the schedule on the server?...because calendar1.schedule.saveto(path,type) fails....

  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Saving contacts asociated to an appointment
Reply #3 - Apr 5th, 2012 at 3:11pm
Print Post  
Hi,
I can't reproduce the problem with AutoPostBack set to true.

Could you try to reproduce the issue with the attached sample? It is the same sample that we sent you through the help desk, with a small alteration in the Page_Load handler to test the resources.

Just load the application and create a new appointment (there should be one location and two contact resources available to assign). After the postback, check if the appointment has retained the resources bindings.

Or if you prefer you can send us a sample that reproduces the problem at support@mindfusion.eu
  

ScheduleRemindersSample.zip (Attachment deleted)
Back to top
 
IP Logged
 
Fernando Castro
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 7
Joined: Apr 5th, 2012
Re: Saving contacts asociated to an appointment
Reply #4 - Apr 28th, 2012 at 3:31pm
Print Post  
I resolved the problem. It was about using the clear method on contacts. It was a programming problem, not about the component. Thanks
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint