private void ResetControls() { //setting local variables int intCounter; int intNumberOfRecords; bool blnFatalError = false; try { txtEnterTask.Text = ""; cboSelectTask.Items.Clear(); cboSelectTask.Items.Add("Select Task"); cboSelectTask.SelectedIndex = 0; TheFindSortedCustomerLinesDataSet = TheDepartmentClass.FindSortedCustomerLines(); intNumberOfRecords = TheFindSortedCustomerLinesDataSet.FindSortedCustomerLines.Rows.Count; cboSelectBusinessLine.Items.Clear(); cboSelectBusinessLine.Items.Add("Select Business Line"); for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { cboSelectBusinessLine.Items.Add(TheFindSortedCustomerLinesDataSet.FindSortedCustomerLines[intCounter].Department); } cboSelectBusinessLine.Items.Add("All"); cboSelectBusinessLine.SelectedIndex = 0; cboSelectDepartment.Items.Clear(); cboSelectDepartment.Items.Add("Select Department"); TheFindSortedProductionTypesDataSet = TheDepartmentClass.FindSortedProductionTypes(); intNumberOfRecords = TheFindSortedProductionTypesDataSet.FindSortedProductionTypes.Rows.Count; for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(TheFindSortedProductionTypesDataSet.FindSortedProductionTypes[intCounter].Department); } cboSelectDepartment.Items.Add("All"); cboSelectDepartment.SelectedIndex = 0; blnFatalError = TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Add Productivity Work Task "); } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Add Productivity Work Task // Reset Controls " + Ex.Message); TheSendEmailClass.SendEventLog("New Blue Jay ERP // Add Productivity Work Task // Reset Controls " + Ex.ToString()); TheMessagesClass.ErrorMessage(Ex.ToString()); } }
public FindSortedProductionTypesDataSet FindSortedProductionTypes() { try { aFindSortedProductionTypesDataSet = new FindSortedProductionTypesDataSet(); aFindSortedProductionTypesTableAdapter = new FindSortedProductionTypesDataSetTableAdapters.FindSortedProductionTypesTableAdapter(); aFindSortedProductionTypesTableAdapter.Fill(aFindSortedProductionTypesDataSet.FindSortedProductionTypes); } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "The Department Class // Find Sorted Production Types " + Ex.Message); } return(aFindSortedProductionTypesDataSet); }