Code: Select all
// 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>();
using (IOrder order = ot.CreateOrder())
{
try
{
// TODO: Manipulate the order
ValidationMessage[] messages;
// Save the order. A failure to save will return false. Error messages will be returned in
// the messages out parameter.
if (!ot.SaveOrder(order, out messages))
{
// Handle order save failure
}
else
{
// Handle order save success
}
}
finally
{
// This MUST be called to release any locks on the order.
ot.CloseOrder(order);
}
}
ot.SaveOrder is not a valid method. What would be the new way that returns the array of messages? ValidationMessage also is no longer a valid object.
Doug