private bool ItemFind() { QuickSearch quickSearch = null; bool result = false; try { if (!itemIsFindind) { itemIsFindind = true; quickSearch = MyApp.CreateQuickSearch(QuickSearchViews.QSV_Item, MyApp.SystemSettings.StartUpInfo.CacheQuickSearchItem); clsCollection qsParams = new clsCollection(); qsParams.add(MyApp.SystemSettings.QuickSearchDefaults.WarehouseID, "@WarehouseID"); qsParams.add(MyApp.SystemSettings.QuickSearchDefaults.PriceLineID, "@PriceLineID"); qsParams.add(MyApp.SystemSettings.QuickSearchDefaults.LanguageID, "@LanguageID"); qsParams.add(MyApp.SystemSettings.QuickSearchDefaults.DisplayDiscontinued, "@Discontinued"); if (MyApp.SystemSettings.StartUpInfo.UseItemSearchAlterCurrency) { qsParams.add(MyApp.SystemSettings.AlternativeCurrency.SaleExchange, "@ctxBaseCurrency"); } else { qsParams.add(MyApp.SystemSettings.QuickSearchDefaults.EuroConversionRate, "@ctxBaseCurrency"); } quickSearch.Parameters = qsParams; if (quickSearch.SelectValue()) { result = true; var itemId = quickSearch.ValueSelectedString(); //MyApp.ItemGet(itemId); } itemIsFindind = false; } } catch (Exception ex) { itemIsFindind = false; MessageBox.Show(ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } finally { } quickSearch = null; return(result); }