Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Command line sample project, any more XML file entries?

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support
View previous topic :: View next topic  
Author Message
tonyvsuk



Joined: 27 Jun 2016
Posts: 2

PostPosted: Fri Sep 02, 2016 1:49 pm    Post subject: Command line sample project, any more XML file entries? Reply with quote

Hello,

I've managed to build and run the command line sample project.

Are there any more valid entries that can go in the "sample.xml" file ? I was hoping I could add something like

<Company>My Company Inc</Company>

But this is ignored, the company field in the database is left blank.

Thanks in advance,

Tony.
Back to top
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Sep 02, 2016 11:54 pm    Post subject: Reply with quote

You can easily add any field that the database supports by changing the sample project code. Add the field you want eg Company to the Purchase class and then change the Read method to be able to read this property. Finally in the Program Main method you can add:

Code:
customer.Company = purchase.Comany


to the following block of code:

Code:
if (customer == null)
{
    customer = new Customer(database);
    customer.LastName = purchase.LastName;
    customer.FirstName = purchase.FirstName;
    customer.Email = purchase.Email;
    customer.Street = purchase.AddressStreet;
    customer.City = purchase.AddressCity;
    customer.State = purchase.AddressState;
    customer.ZIP = purchase.AddressZip;
    customer.Insert();
}

_________________
Infralution Support
Back to top
View user's profile Send private message Visit poster's website
tonyvsuk



Joined: 27 Jun 2016
Posts: 2

PostPosted: Mon Sep 05, 2016 1:22 pm    Post subject: Reply with quote

Many thanks, all up and running now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Licensing Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group