예제 #1
0
        /// <summary>
        /// 过滤查找
        /// </summary>
        public void FilterSearch()
        {
            String sText = m_searchTextBox.Text.ToUpper();

            m_grid.BeginUpdate();
            m_grid.ClearRows();
            int row = 0;
            CList <GSecurity> securities = SecurityService.FilterCode(sText);

            if (securities != null)
            {
                int rowCount = securities.size();
                for (int i = 0; i < rowCount; i++)
                {
                    GSecurity security = securities.get(i);
                    GridRow   gridRow  = new GridRow();
                    m_grid.AddRow(gridRow);
                    gridRow.AddCell(0, new GridStringCell(security.m_code));
                    gridRow.AddCell(1, new GridStringCell(security.m_name));
                    row++;
                }
            }
            securities.Dispose();
            m_grid.EndUpdate();
        }