public GetSapData() { #region 获取SAP连接 try { Dest = SAPConnection.GetSAPConnection(); RFC = Dest.Repository; Client = System.Configuration.ConfigurationManager.AppSettings["Client"]; } catch (Exception ex) { if (ex.Message != "Destination configuration already initialized") { } else { Dest = RfcDestinationManager.GetDestination("SAP"); RFC = Dest.Repository; } } #endregion }