private void ResoreButton_Click(object sender, RoutedEventArgs e)
 {
     this._RestoreInfo = this.RestoreProcess.SelectedItem as UpdateHighLowBatchProcessInfo;
     ConsoleClient.Instance.RestoreHighLow(this._RestoreInfo.ExchangeCode, this._RestoreInfo.BatchProcessId, this.ResoreHiLoCallBack);
 }
 public UpdateHighLowBatchProcessInfo UpdateHighLow(Guid instrumentId, bool isOriginHiLo, string newInput, bool isUpdateHigh)
 {
     UpdateHighLowBatchProcessInfo info = new UpdateHighLowBatchProcessInfo();
     int batchProcessId;
     string instrumentCode;
     bool highBid ;
     bool lowBid;
     DateTime updateTime;
     DateTime minTimestamp;
     iExchange.Common.OverridedQuotation[] overridedQs;
     int returnValue;
     string errorMessage;
     this._QuotationServer.UpdateHighLow(new Token(), "", instrumentId, isOriginHiLo, newInput, isUpdateHigh, out batchProcessId, out instrumentCode, out highBid, out lowBid, out updateTime, out minTimestamp, out overridedQs, out returnValue, out errorMessage);
     this._StateServer.BroadcastQuotation(new Token(Guid.Empty, UserType.System, AppType.QuotationServer), null, overridedQs);
     info.BatchProcessId = batchProcessId;
     info.InstrumentId = instrumentId;
     info.InstrumentCode = instrumentCode;
     info.IsHigh = isUpdateHigh;
     info.NewInput = newInput;
     info.StateCode = returnValue;
     info.ErrorMessage = errorMessage;
     info.UpdateTime = updateTime;
     return info;
 }
 private void UpdateHighLowCallBack(UpdateHighLowBatchProcessInfo info)
 {
     this.Dispatcher.BeginInvoke((Action)delegate()
     {
         if (info.StateCode == 0)
         {
             ExchangeQuotationViewModel.Instance.HighLowBatchProcessInfos.Add(info);
             string message = string.Format("Success to update {0} at {1}.\r\nBatchProcessId:{2}",info.IsHigh? "High":"Low",info.UpdateTime,info.BatchProcessId);
             MessageBox.Show(App.MainFrameWindow, message, "", MessageBoxButton.OK);
         }
         else
         {
             string message = string.Format("Update {0} failed.\r\n ErrorMessage:{1}", info.IsHigh ? "High" : "Low", info.ErrorMessage);
             MessageBox.Show(App.MainFrameWindow, message, "", MessageBoxButton.OK);
         }
     }, null);
 }