Ejemplo n.º 1
0
        private void butBack_Click(object sender, EventArgs e)
        {
            //pop the current item off the stack as we are moving back an iteration
            _MatchCache.Pop();

            //Convert the last Cache to a datatable
            _CurrentDataTable = ConvertToDataTable(_MatchCache.Peek());

            //Display datatable in GridView
            DGResults.DataSource = _CurrentDataTable;
            DGResults.Refresh();

            //If there is only one cache then disable the back button as we can go back no further
            if (_MatchCache.Count <= 1)
            {
                butBack.Enabled = false;
            }
        }
Ejemplo n.º 2
0
        private void DGResults_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            //Catch Any singlerecords displayed as picklists
            if (_MatchCache.Count > 0)
            {
                if (_MatchCache.Peek().TypeOfResult == MatchResultCodes.SingleMatch)
                {
                    this.FoundRecord = _MatchCache.Peek();
                    BuildColumnLookup();
                    this.DialogResult = DialogResult.OK;
                    return;
                }
            }

            RunMatch(_LocatorId, _MatchType, _Query, _UseFuzzy, true, DGResults.CurrentRow.Index);
            DGResults.DataSource = _CurrentDataTable;

            DGResults.Refresh();

            //enable the back button as now we are 1 step down the results tree
            butBack.Enabled = true;
        }