/// <summary> /// /// </summary> /// <param name="consumerTrusts"></param> /// <returns></returns> public static MethodResponseArrayOfguid CreateReport(Report[] reports) { MethodResponseArrayOfguid response = null; // Update the database. TradingSupportClient tradingSupportClient = new TradingSupportClient(Guardian.Properties.Settings.Default.TradingSupportEndpoint); try { response = tradingSupportClient.CreateReport(reports); } catch (Exception exception) { // Any issues trying to communicate to the server are logged. EventLog.Error("{0}, {1}", exception.Message, exception.StackTrace); } finally { if (tradingSupportClient != null && tradingSupportClient.State == CommunicationState.Opened) { tradingSupportClient.Close(); } } return(response); }