How to set profile when creating a order through API?
Posted: Mon May 16, 2011 4:05 pm
How can I set the profile when creating an order? Thanks.
// Create the server object. Note the use of the constant to define custom login.
NetworkCredential credential = new NetworkCredential(@"<username>", @"<password>", SoftPro.Select.Client.Constants.SelectDomain);
SelectServer server = new SelectServer(null, new Uri(@"http://localHost:80/SelectServer"), credential);
// Create the order tracking client
SoftPro.OrderTracking.Client.OrderTracking ot = server.GetService<SoftPro.OrderTracking.Client.OrderTracking>();
// Create the specification for the new order number.
OrderCreationSpec spec = new OrderCreationSpec()
{
BaseOrderNumber = @"MyOrderNumber",
Prefix = @"Pre",
Suffix = @"Suf"
}
using ( IOrder order = ot.CreateOrder(spec) )
....