//生成返回消息体
        protected virtual void ReportExcuResult(string symbol, Message msg, SessionID sid)
        {
            try
            {
                var cs = msg.getField(ReportIndex);
                var oid = msg.getField(ClientOrderIdIndex);

                if (cs == "0") //queued
                {
                    FixReport(msgTypeQueued, msg, ClientOrderIdIndex, string.Format(rspOrderStatus, Queued, symbol, 0, 0, oid));
                    unFill.ChangeStatus(oid, "Queued");
                }
                else if (cs == "8") // reject
                {
                    var res = string.Format(rspOrderStatus, Reject, symbol, 0, 0, oid);
                    res += string.Format(rspError, msg.getField(TextIndex));
                    FixReport(msgTypeReject, msg, ClientOrderIdIndex, res);
                    unFill.ChangeStatus(oid, "Reject");
                    unFill.Remove(oid);
                }
                else if (cs == "4") // cancel
                {
                    //目前4消息分两种情况:撤单消息返回、市价单不成功或不完全成功。
                    //撤单消息返回时:有41,44字段。
                    //市价单不成功时:无41,44字段。
                    if (msg.isSetField(41) && msg.isSetField(44))
                    {
                        FixReport(msgTypeCancel, msg, ClientOrderIdIndex, string.Format(rspCancel, msg.getField(41)));
                    }
                    else
                    {
                        var res = string.Format(rspOrderStatus, Reject, symbol, 0, 0, oid);
                        res += string.Format(rspError, "MarketOrder is IOC/FOK(TimeInForce)");
                        FixReport(msgTypeReject, msg, ClientOrderIdIndex, res);
                    }
                    unFill.ChangeStatus(oid, "Canceled Or MarketOrderCanceled");
                    unFill.Remove(oid);
                }
                else if (cs == "1") //partiallyFilled
                {
                    var price = msg.getField(PriceIndex);
                    var qty = (msg.getField(SideIndex) == SideSell ? "-" : "") + msg.getField(QtyIndex);

                    DefDealProc(symbol, price, qty, oid);
                    FixReport(msgTypePartFill, msg, ClientOrderIdIndex,
                        string.Format(rspOrderStatus, PartFill, symbol, price, qty, oid));
                    unFill.ChangeStatus(oid, "PartiallyFilled");
                }
                else if (cs == "2") //filled
                {
                    var price = msg.getField(PriceIndex);
                    var qty = (msg.getField(SideIndex) == SideSell ? "-" : "") + msg.getField(QtyIndex);

                    DefDealProc(symbol, price, qty, oid);
                    FixReport(msgTypePartFill, msg, ClientOrderIdIndex,
                        string.Format(rspOrderStatus, FullFill, symbol, price, qty, oid));
                    unFill.ChangeStatus(oid, "Filled");
                    unFill.Remove(oid);
                }
            }
            catch (Exception) { }
        }
        public override void fromAdmin(Message message, SessionID sessionID)
        {
            base.fromAdmin(message, sessionID);

            if ((message is QuickFix42.Logout || message is QuickFix42.Reject) && message.isSetField(QuickFix.Text.FIELD))
            {
                Console.WriteLine(message.getString(QuickFix.Text.FIELD));
            }

            if (message is QuickFix42.Logout)
            {
                Disconnect();
            }
        }