/// <summary>
        /// 根据窗口类型实例化包含不同标题、按钮文字等信息的定单改变窗口
        /// </summary>
        /// <param name="type">窗口类型</param>
        public OrderChangedWindow( OrderChangedWindowType type ) {
            InitializeComponent( );
            _orderChangedInfo = new OrderChangedInformation( );

            string windowTitle;
            string waterMark;
            string buttonContent;

            if( type == OrderChangedWindowType.Chargeback ) {
                windowTitle = "平仓";
                waterMark = "请输入平仓数量";
                buttonContent = "平仓";
            } else {
                windowTitle = "入库";
                waterMark = "请输入入库数量";
                buttonContent = "入库";
            }

            Title = windowTitle;
            DudCount.Watermark = waterMark;
            BtOk.Content = buttonContent;
        }
 /// <summary>
 /// 平仓信息的验证
 /// </summary>
 /// <param name="ordersInfo">平仓的详细信息</param>
 /// <param name="operateClient">要平仓的某个用户的定单</param>
 /// <returns>ValidationResult</returns>
 private ValidationResult ChargebackOrderValidation(OrderChangedInformation ordersInfo, ClientAccount operateClient)
 {
     return ValidationHelper.OrderCountValidation(ordersInfo.Count, operateClient.TransactionSettings.OrderUnit);
 }
        /// <summary>
        /// 有效定单入库
        /// </summary>
        /// <param name="loginID">登陆标识</param>
        /// <param name="userType">用户类型,0:交易用户,1:管理员,2:金商</param>
        /// <param name="orderInfo">平仓信息</param>
        /// <returns>ErrType</returns>
        public ErrType WarehousingOrder(string loginID, int userType, OrderChangedInformation orderInfo)
        {
            try
            {
                DeliveryEnter delEnter = TradeConverter.ToDeliveryEnter(loginID, userType, orderInfo);
                //Todo:金能网待处理
                #region 金能网待处理
                //Marketorders result = TradeService.GetMarDelivery(delEnter);
                //if (!result.Result)
                //    return new ErrType(ERR.SERVICE, result.Desc); 
                #endregion

                return GeneralErr.Success;
            }
            catch (TimeoutException te)
            {
                FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, te.Message); 
                return new ErrType(ERR.EXEPTION, ErrorText.TimeoutException);
            }
            catch (Exception ex)
            {
                FileLog.WriteLog("", Assembly.GetExecutingAssembly().GetName().Name, this.GetType().Name, new StackTrace().GetFrame(0).GetMethod().Name, ex.Message);
                return new ErrType(ERR.EXEPTION, ErrorText.OperationError);
            }
        }
 internal static DeliveryEnter ToDeliveryEnter( string loginID, int userType, OrderChangedInformation orderInfo ) {
     return new DeliveryEnter {
         CurrentTime = orderInfo.RealTimeTime,
         LoginID = loginID,
         MaxPrice = orderInfo.AllowMaxPriceDeviation,
         Orderid = orderInfo.OrderID,
         Quantity = orderInfo.Count,
         RtimePrices = orderInfo.RealTimePrice,
         TradeAccount = orderInfo.TradeAccount,
         //Todo:用户类型待处理
         //UserType = userType,
     };
 }
 /// <summary>
 /// 用定单改变的详细信息实例化定单改变事件参数类
 /// </summary>
 /// <param name="info">定单改变的详细信息类</param>
 public OrderChangedEventArgs( OrderChangedInformation info ) {
     OrderChangedInfo = info;
 }