DEFINE INPUT PARAMETER custNum AS INTEGER NO-UNDO.
... FUNCTION GetTotalOrdersByNumber RETURNS INTEGER (threshold AS DECIMAL): ... END. ... |
namespace BigOrderInfoClient {
using Progress.Open4GL; using Progress.Open4GL.Proxy; public class samplecode { public static void PersistentProcedure( ) { // Connect to the AppServer Connection myConn = new Connection ("AppServer://localhost/asbroker2", "", "", ""); OpenAppObject openAO = new OpenAppObject(myConn, "mySvc"); // Run the persistent procedure // First set up parameters ParamArray parms = new ParamArray(1); System.Int32 custNum = 3; // Set up input parameters parms.AddInteger(0, custNum, ParamArrayMode.INPUT); // Run procedure OpenProcObject openPO = openAO.CreatePO("OrderInfo/CustomerOrder.p", parms); // Call UDF // First set up parameters System.Decimal retVal; int Threshold = 1000; parms.Clear( ); // Clear ParamArray for next call // Set up input parameters parms.AddDecimal(0, Threshold, ParamArrayMode.INPUT); // Set up return type parms.ReturnType = Parameter.PRO_DECIMAL; // Run procedure openPO.RunProc("GetTotalOrdersByNumber", parms); // Get return value retVal = (System.Decimal)parms.ReturnValue; openPO.Dispose( ); openAO.Dispose( ); } } } |