private void EmitCancelReject(GenericOrderItem item,int error_id,string message)
        {
            TextResponse r = new TextResponse()
            {
                Error = CTPAPI.FromCTP(error_id),
                ErrorID = error_id,
                ErrorMsg = message,
            };

            foreach (var leg in item.GetLegs())
            {
                r.OpenClose = leg.OpenClose;
                leg.Order.Text = r.ToString();
                EmitCancelReject(leg.Order, leg.Order.OrdStatus, r.ToString());
            }
        }
        private void EmitRejected(GenericOrderItem item, string message)
        {
            TextResponse r = new TextResponse()
            {
                Error = EnumError.OTHER,
                StatusMsg = message,
            };

            foreach (var leg in item.GetLegs())
            {
                r.OpenClose = leg.OpenClose;
                leg.Order.Text = r.ToString();
                EmitRejected(leg.Order, r.ToString());
            }
        }