private void ResetControls()
        {
            TheToolIDDataSet = TheToolIDClass.GetToolIDInfo();

            dgrToolIDs.ItemsSource = TheToolIDDataSet.toolid;

            TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Add Tool Category ID");
        }
        private void expProcess_Expanded(object sender, RoutedEventArgs e)
        {
            int    intCounter;
            int    intNumberOfRecords;
            int    intCategoryID;
            int    intRecordsReturned;
            string strCategory;
            bool   blnFatalError = false;

            try
            {
                expProcess.IsExpanded = false;

                TheFindSortedToolCategoryDataSet = TheToolCategoryClass.FindSortedToolCategory();

                intNumberOfRecords = TheFindSortedToolCategoryDataSet.FindSortedToolCategory.Rows.Count;

                for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++)
                {
                    intCategoryID = TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].CategoryID;
                    strCategory   = TheFindSortedToolCategoryDataSet.FindSortedToolCategory[intCounter].ToolCategory;

                    TheFindToolIDByCategoryDataSet = TheToolIDClass.FindToolIDByCategory(strCategory);

                    intRecordsReturned = TheFindToolIDByCategoryDataSet.FindToolIDByCategory.Rows.Count;

                    if (intRecordsReturned < 1)
                    {
                        blnFatalError = TheToolIDClass.InsertNewToolIDForToolType(intCategoryID, "1000");

                        if (blnFatalError == true)
                        {
                            throw new Exception();
                        }
                    }
                }

                TheMessagesClass.InformationMessage("The Categories have been updated");

                TheToolIDDataSet = TheToolIDClass.GetToolIDInfo();

                dgrToolIDs.ItemsSource = TheToolIDDataSet.toolid;
            }
            catch (Exception Ex)
            {
                TheSendEmailClass.SendEventLog("New Blue Jay ERP // Add Tool Category ID // Process Button " + Ex.Message);

                TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Add Tool Category ID // Process Button " + Ex.Message);

                TheMessagesClass.ErrorMessage(Ex.ToString());
            }
        }