public void ExecuteSendPlaceOrderData1(object para)
        {
            try
            {
                DelegationModel rtm = para as DelegationModel;

                DelegationModelViewModel dmvm = OrderCancelViewModel.Instance().Delegations.FirstOrDefault(x => x.OrderId == rtm.order_id && rtm.user_id == UserInfoHelper.UserId);
                if (dmvm == null)
                {
                    OrderCancelViewModel.Instance().Delegations.Add(new DelegationModelViewModel(rtm));
                }
                else
                {
                    dmvm.OrderStatus = rtm.order_status;
                    //详细状态
                    dmvm.FailMsg = rtm.fail_msg;
                }
                DelegationModelViewModel dmvm1 = OrderCancelViewModel.Instance().KCDelegations.FirstOrDefault(x => x.OrderId == rtm.order_id && rtm.user_id == UserInfoHelper.UserId);
                if (dmvm1 != null)
                {
                    OrderCancelViewModel.Instance().KCDelegations.Remove(dmvm1);
                }
            }
            catch (Exception ex)
            {
                LogHelper.Info(ex.ToString());
            }
        }
        public void ExecuteDelegationData(object para)
        {
            try
            {
                DelegationModel      rtm  = para as DelegationModel;
                OrderCancelViewModel ocvm = OrderCancelViewModel.Instance();
                if (ocvm.Delegations.FirstOrDefault(x => x.OrderId == rtm.order_id) != null)
                {
                    return;
                }
                if (rtm.bLast)
                {
                    //PositionViewModel.Instance().JSAbleVolume();
                    TransactionViewModel.Instance().FigureUpNum(TransactionViewModel.Instance()._futures);
                    return;
                }
                VarietyModel vm     = null;
                string[]     values = rtm.contract_code.Split(' ');
                if (values.Length == 3)
                {
                    string varietie = values[1];
                    if (ContractVariety.Varieties.ContainsKey(varietie))
                    {
                        vm = ContractVariety.Varieties[varietie];
                    }
                    if (vm != null)
                    {
                        rtm.precision = vm.precision;
                    }
                }


                DelegationModelViewModel dmvm = new DelegationModelViewModel(rtm);

                ocvm.Delegations.Add(dmvm);
                if (rtm.order_status == (int)DeleteType.CreateSuccess || rtm.order_status == (int)DeleteType.PortionTakeEffect)
                {
                    ocvm.KCDelegations.Add(dmvm);
                }
            }
            catch (Exception ex)
            {
                LogHelper.Info(ex.ToString());
            }
        }
        public void ExecuteSendPlaceOrderData(object para)
        {
            try
            {
                DelegationModel rtm    = para as DelegationModel;
                VarietyModel    vm     = null;
                string[]        values = rtm.contract_code.Split(' ');
                if (values.Length == 3)
                {
                    string varietie = values[1];
                    if (ContractVariety.Varieties.ContainsKey(varietie))
                    {
                        vm = ContractVariety.Varieties[varietie];
                    }
                    if (vm != null)
                    {
                        rtm.precision = vm.precision;
                    }
                }

                DelegationModelViewModel dmvm = OrderCancelViewModel.Instance().Delegations.FirstOrDefault(x => x.OrderId == rtm.order_id);
                if (dmvm == null)
                {
                    return;
                    //OrderCancelViewModel.Instance().Delegations.Add(new DelegationModelViewModel(rtm));
                }
                //DelegationModelViewModel dmvmisHave = OrderCancelViewModel.Instance().Delegations.FirstOrDefault(x => x.OrderId == rtm.order_id && x.OrderStatus == (int)DeleteType.CreateSuccess);
                ////if (dmvmisHave != null)
                //{
                //    return;
                //    //OrderCancelViewModel.Instance().Delegations.Add(new DelegationModelViewModel(rtm));
                //}
                if (rtm.order_status == (int)DeleteType.CreateSuccess || rtm.order_status == (int)DeleteType.PortionTakeEffect)
                {
                    DelegationModelViewModel dmvm1 = OrderCancelViewModel.Instance().KCDelegations.FirstOrDefault(x => x.OrderId == rtm.order_id && rtm.user_id == UserInfoHelper.UserId);
                    if (dmvm1 == null)
                    {
                        OrderCancelViewModel.Instance().KCDelegations.Add(new DelegationModelViewModel(rtm));
                        LogHelper.Info("4003  增加 可撤" + rtm.contract_code + ":" + rtm.direction + ":" + rtm.open_offset + ":" + rtm.order_status);
                    }

                    dmvm.OrderStatus = rtm.order_status;
                    //详细状态
                    dmvm.FailMsg = rtm.fail_msg;
                }
                else
                {
                    dmvm.LeftVolume  = dmvm.OrderVolume - rtm.trade_volume;
                    dmvm.TradeVolume = rtm.trade_volume;
                    dmvm.OrderStatus = rtm.order_status;
                    dmvm.LeftVolume  = rtm.left_volume;

                    //详细状态
                    dmvm.FailMsg = rtm.fail_msg;
                    DelegationModelViewModel dmvm1 = OrderCancelViewModel.Instance().KCDelegations.FirstOrDefault(x => x.OrderId == rtm.order_id && rtm.user_id == UserInfoHelper.UserId);

                    if (dmvm1 != null)
                    {
                        OrderCancelViewModel.Instance().KCDelegations.Remove(dmvm1);
                        LogHelper.Info("4003  移除 可撤" + rtm.contract_code + ":" + rtm.direction + ":" + rtm.open_offset + ":" + rtm.order_status);
                    }
                }

                DelegationModelViewModel tem1 = OrderCancelViewModel.Instance().KCDelegations.FirstOrDefault(x => x.OrderId == rtm.order_id && rtm.user_id == UserInfoHelper.UserId);
                if (tem1 != null)
                {
                    tem1.LeftVolume  = tem1.OrderVolume - rtm.trade_volume;
                    tem1.TradeVolume = rtm.trade_volume;
                    tem1.OrderStatus = rtm.order_status;
                    //详细状态
                    dmvm.FailMsg = rtm.fail_msg;
                }
                if (rtm.order_status == (int)DeleteType.UnTakeEffecUserCannel)
                {
                    if (CommParameterSetting.MessageAlert.RevokeAlert == "窗口提示")
                    {
                        MessageBox.Show(rtm.contract_id + " 委托撤单成功", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    }
                    else if (CommParameterSetting.MessageAlert.RevokeAlert == "声音提示")
                    {
                        SoundPlayerHelper.Play();
                    }
                }
                TransactionViewModel.Instance().SelectNumExecuteChanged();
            }
            catch (Exception ex)
            {
                LogHelper.Info(ex.ToString());
            }
        }