How to search for Solomon Order Records


 

// lets populate the parms.  we will take whatever is in the tbCustID to be a partial custID search,
//and whatever is in the tbOrdNbr for partial order number
// and combine to get a result
StringBuilder parms = new StringBuilder();
parms.Append("CUSTID|" + tbCustID.Text.Trim() + "%");
parms.Append(";ORDNBR|" + tbOrdNbr.Text.Trim() + "%");
parms.Append(";STATUS|O");  //only open orders

// call the getOrders() method and load the datasource
ctDynamicsSLOrders.orders ordersService  = new ctDynamicsSLOrders.orders();
ctDynamicsSLOrders.ctDynamicsSLHeader oHeader = new ctDynamicsSLOrders.ctDynamicsSLHeader();
oHeader.licenseExpiration = "myLicenseExpirateDate"; //leave blank if no expiration date;
oHeader.licenseKey = "myLicenseKey";
oHeader.licenseName = "myCompanyName";
oHeader.siteKey = "encryptionKey";
oHeader.siteID = "mySiteID";
oHeader.cpnyID = "mySolomonCpnyID";
oHeader.softwareName = "CTAPI";
ordersService.ctDynamicsSLHeaderValue = oHeader;
ordersService.Url = "http://localhost/ctDynamicsSL/orders.asmx";
String sortBy = "ordNbr";
  
DataSet ds = ordersService.getOrders("", "0", "20", parms.ToString(), sortBy);
//We now have a System.Data.DataSet with all orders that match our filters