internal void MessageClient_OverridedQuotationReceived(OverridedQuotationMessage overridedQuotationMessage)
 {
     App.Current.Dispatcher.BeginInvoke((Action)delegate()
     {
         this.ExchangeDataManager.ProcessOverridedQuotation(overridedQuotationMessage);
     });
 }
 public void Process(OverridedQuotationMessage message)
 {
     ExchangeQuotationViewModel.Instance.Load(message.ExchangeCode, message.OverridedQs);
 }
        private bool SetQuotation(List<GeneralQuotation> quotations)
        {
            if (this._StateServer == null) return false;
            bool isSucceed = false;
            iExchange.Common.OriginQuotation[] originQs = null;
            iExchange.Common.OverridedQuotation[] overridedQs = null;
            Token token = new Token(Guid.Empty, UserType.System, AppType.QuotationCollector);
            try
            {
                isSucceed = this._QuotationServer.SetQuotation(token, quotations, out originQs, out overridedQs);
                if (isSucceed && (originQs != null || overridedQs != null))
                {
                    token.AppType = AppType.QuotationServer;
                    this._StateServer.BroadcastQuotation(token, originQs, overridedQs);
                }
                if (overridedQs != null && overridedQs.Length > 0)
                {
                    OverridedQuotationMessage message = new OverridedQuotationMessage();
                    message.ExchangeCode = this.ExchangeCode;
                    message.OverridedQs = overridedQs.ToList();
                    MainService.ClientManager.Dispatch(message);
                }
                //foreach (OverridedQuotation item in collection)
                //{

                //}
            }
            catch (Exception e)
            {
                Logger.TraceEvent(TraceEventType.Error, "ExchangeSystem.SetQuotation\r\n{0}", e.ToString());
                return false;
            }
            return true;
        }
 private void Process(OverridedQuotationMessage overidedQuotationMessage)
 {
     this._QuotationMessageProcessor.Process(overidedQuotationMessage);
     this._ExchangeDataManager.ProcessOverridedQuotation(overidedQuotationMessage);
 }