/// <summary> /// Execute Factory Engine Method from Remoting Server /// </summary> /// <param name="engineName"></param> /// <param name="engineMethod"></param> /// <param name="engineParamValue"></param> /// <param name="msg"></param> /// <returns></returns> /// Owner:Andy Gao 2011-07-12 08:14:19 public static DataSet ExecuteEngineMethod(string engineName, string engineMethod, DataSet engineParamValue, out string msg) { msg = string.Empty; DataSet resDS = null; #region Call Remoting Interface try { IServerObjFactory serverFactory = CallRemotingService.GetRemoteObject(); if (serverFactory == null) { msg = "The Server Factory is null."; } else { resDS = serverFactory.ExecuteEngineMethod(engineName, engineMethod, engineParamValue); msg = resDS.ExtendedProperties.ContainsKey(PARAMETERS.OUTPUT_MESSAGE) ? resDS.ExtendedProperties[PARAMETERS.OUTPUT_MESSAGE].ToString() : string.Empty; } } catch (Exception ex) { msg = ex.Message; } finally { CallRemotingService.UnregisterChannel(); } #endregion return(resDS); }