private void cboSelectCategory_SelectionChanged(object sender, SelectionChangedEventArgs e) { int intSelectedIndex; try { intSelectedIndex = cboSelectCategory.SelectedIndex - 2; if (intSelectedIndex == -1) { TheFindAvailableActiveToolsDataSet = TheToolsClass.FindAvailableActiveTools(); dgrResults.ItemsSource = TheFindAvailableActiveToolsDataSet.FindAvailableActiveTools; } else if (intSelectedIndex > -1) { ThefindAvailableActiveToolsByCategoryDataSet = TheToolsClass.FindAvailableActiveToolsByCategory(TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intSelectedIndex].ToolCategory); dgrResults.ItemsSource = ThefindAvailableActiveToolsByCategoryDataSet.FindAvailableActiveToolsByCategory; } } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Find Available Tools // cbo Select Category Selection Changed " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }