Reply
 
LinkBack Thread Tools Display Modes
Old 08-19-2009, 07:09 PM   #1 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 6
ogharib is on a distinguished road
Unhappy How could I "set" a contact's property?

I wrote the following code in C# to modify both "Contact" and "ContactEmail" properties of the "Client" class instance:

ProjectSearchCriteria criteria = new ProjectSearchCriteria(ProjectSearchKey.CompanyName , "Training");
SDKProjectList projects = projectFactory.GetData(criteria);
SDKProject selectedProject;
if (projects.Count == 1)
{
selectedProject = projects[0];
selectedProject.Contacts[0].Address.Contact = "John";
selectedProject.Contacts[0].Address.ContactEmail = "test@yahoo.com";
selectedProject.Contacts[0].Save();
}

After executing such code, D-Tools SI 5.5's interface does not reflect the changes as well as the database "DToolsProjects50". What is wrong with my code?
ogharib is offline   Reply With Quote
Old 08-20-2009, 06:20 AM   #2 (permalink)
Senior Member
 
nkarthick's Avatar
 
Join Date: May 2009
Location: Chennai, India
Posts: 138
nkarthick is on a distinguished road
Default Check your project search critertia

Tested your code it works fine. It saved the contact information correctly.

The problem is you may have more than one projects for that company (client) name "Training" or else you may not have project for that company(client).


Notes -
- Make sure you have only one project for that company(client) if not then change your logic.
__________________
Narayana Karthik

Last edited by nkarthick; 08-20-2009 at 06:24 AM.
nkarthick is offline   Reply With Quote
Old 08-23-2009, 09:17 AM   #3 (permalink)
Junior Member
 
Join Date: Aug 2009
Posts: 6
ogharib is on a distinguished road
Wink Forgot to "Check Out" the project

Thanks, nkarthick.

My problem was so simple; I just need to "Check Out" the project from D-Tools SI 5.5 in order to have my modifications reflected in D-Tools SI 5.5 interface.

Last edited by ogharib; 08-23-2009 at 09:21 AM.
ogharib is offline   Reply With Quote
Reply

Tags
modify property, sdk


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-Time Error '380' -- Invalid Property Value kriskcytek Bugs Section 4 03-23-2010 10:34 PM
Adding a custom property to a visio shape. johnh 'How Do I' Questions 1 11-28-2009 05:58 AM
Adding Custom Property to Schematic Stencil Stogey Visio Schematics 4 09-12-2009 08:21 AM
Subtotaling accessories per area and project on a report JSpence Reports and Reporting Center 8 06-27-2009 07:53 AM
Location Property of D-ToolsSOItem ManjitS SDK 0 11-16-2006 09:46 PM


All times are GMT. The time now is 01:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
D-Tools, Inc.