/// <summary> /// Must be called by GUI thread. /// </summary> private void UpdateRejectList() { // Disconnect data source. this.dataGridView1.SuspendLayout(); this.dataGridView1.DataSource = null; m_RejectedFills.Clear(); // Create new list. List <InstrumentName> m_InstrumentNames = new List <InstrumentName>(); m_FillHub.GetInstrumentNames(ref m_InstrumentNames); foreach (InstrumentName name in m_InstrumentNames) { IFillBook positionBook; if (m_FillHub.TryEnterReadBook(name, out positionBook)) { if (positionBook is BookLifo) { BookLifo book = (BookLifo)positionBook; book.GetRejectedFills(ref m_RejectedFills); } m_FillHub.ExitReadBook(name); } }//next instrument name // Reconnect data source. this.dataGridView1.DataSource = m_RejectedFills; this.dataGridView1.ResumeLayout(); }// UpdateRejectList()
/// <summary> /// This function checks the existence of a fill by exchange time. Only used by audit trail fill hub. /// </summary> /// <param name="exchangeTime"></param> /// <returns></returns> public bool TryCheckFillByExchangeTime(InstrumentKey ttKey, DateTime exchangeTime) { if (!m_FillBooks.ContainsKey(ttKey)) { return(false); } else { BookLifo book = m_FillBooks[ttKey]; bool status = book.IsFillExistByExchangeTime(exchangeTime); return(status); } }