/// <summary> /// Actual execute a move by moving the securities. /// </summary> /// <param name="client">The trading support client to use.</param> /// <param name="records">The security records to move.</param> /// <param name="newParent">The new blotter.</param> /// <returns>The server response</returns> protected override MethodResponseErrorCode MoveSecurity( TradingSupportClient client, BaseRecord[] records, Blotter newParent) { MethodResponseErrorCode response = null; response = client.MoveConsumerTrustToBlotter(newParent.BlotterId, records); return(response); }
/// <summary> /// /// </summary> /// <param name="blotterId"></param> /// <param name="consumerTrust"></param> public static void MoveConsumerTrustToBlotter(Guid blotterId, BaseRecord[] consumerTrust) { // Update the database. TradingSupportClient tradingSupportClient = new TradingSupportClient(Guardian.Properties.Settings.Default.TradingSupportEndpoint); try { MethodResponseErrorCode response = tradingSupportClient.MoveConsumerTrustToBlotter(blotterId, consumerTrust); } 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(); } } }