Ejemplo n.º 1
0
        public object[] Search(SearchParam param, object find)
        {
            // disables the Select command
            _view.SelectEnabled = false;

            // clean previous results
            _view.ClearResults();

            // assigns the parameter selected by the user and the search value
            param.Value = find;
            _searcher.SelectedFilter = param;

            // there is no set transaction to perform the search
            // throws an exception
            if (_searcher.RunFunction == null)
            {
                throw new Exception("A rotina de pesquisa não foi definida para o filtro selecionado.");
            }

            // runs the search
            _searcher.RunFunction.Execute();

            // returns search result
            return(_searcher.RunFunction.Result);
        }