public double GetVendorAccountsPayable(AccountsPayableProxyArgs proxyArgs, string assemblyName) { var result = SPUtility.ExecuteRegisteredProxyOperation( assemblyName, proxyArgs.ProxyOpsTypeName, proxyArgs); if (result.GetType().IsSubclassOf(typeof(Exception))) { throw result as Exception; } double cred = (double)result; return(cred); }
public void SetVendorDetails() { try { AccountsPayableProxyArgs proxyArgs = new AccountsPayableProxyArgs(); proxyArgs.VendorName = vendorName; string assemblyName = proxyArgs.ProxyOpsAssemblyName; view.AccountsPayable = vendorService.GetVendorAccountsPayable(proxyArgs, assemblyName); } catch (Exception ex) { // If an unhandled exception occurs in the view, then instruct the ErrorVisualizer to replace // the view with an errormessage. ViewExceptionHandler viewExceptionHandler = new ViewExceptionHandler(); viewExceptionHandler.HandleViewException(ex, this.ErrorVisualizer); } }