private void ResetControls() { //setting variables int intCounter; int intNumberOfRecords; try { txtInETA.Text = ""; txtLastName.Text = ""; txtOutTime.Text = ""; txtProjectID.Text = ""; txtVehicleNumber.Text = ""; txtWorkDate.Text = ""; txtWorkLocation.Text = ""; gblnVehicleFound = false; TheAfterWorkEmployeesDataSet.afterhoursemployees.Rows.Clear(); dgrAssignedEmployees.ItemsSource = TheAfterWorkEmployeesDataSet.afterhoursemployees; TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); cboSelectOffice.Items.Clear(); cboSelectOffice.Items.Add("Select Office"); intNumberOfRecords = TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectOffice.Items.Add(TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboSelectOffice.SelectedIndex = 0; TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); cboSelectDepartment.Items.Clear(); cboSelectDepartment.Items.Add("Select Department"); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectDepartment.SelectedIndex = 0; cboSelectEmployee.Items.Clear(); TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Submit After Hours Work"); } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Submit After Hours Work // Reset Controls " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }
private void ResetControls() { //setting local variables int intCounter; int intNumberOfRecords; txtEnterLastName.Text = ""; txtEnterProjectSuffix.Text = ""; cboSelectEmployee.Items.Clear(); cboProjectSelectDepartment.Items.Clear(); cboSelectDepartment.Items.Clear(); TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; cboSelectDepartment.Items.Add("Select Department"); cboProjectSelectDepartment.Items.Add("Select Department"); for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboProjectSelectDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); cboSelectDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectDepartment.SelectedIndex = 0; cboProjectSelectDepartment.SelectedIndex = 0; }
private void ResetControls() { //setting local variables int intCounter; int intNumberOfRecords; try { TheImportProjectsDataSet.importprojects.Rows.Clear(); txtEmployeeID.Text = ""; cboSelectDepartment.Items.Clear(); cboSelectDepartment.Items.Add("Select Department"); TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectDepartment.SelectedIndex = 0; cboSelectOffice.Items.Clear(); cboSelectOffice.Items.Add("Select Office"); TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); intNumberOfRecords = TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectOffice.Items.Add(TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboSelectOffice.SelectedIndex = 0; dgrProjects.ItemsSource = TheImportProjectsDataSet.importprojects; } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Import Projects // Main Window // Reset Controls " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }
private void ResetControls() { //setting up variables int intCounter; int intNumberOfRecords; DateTime datStartDate = DateTime.Now; cboSelectDepartment.Items.Clear(); cboSelectEmployee.Items.Clear(); cboSelectInspector.Items.Clear(); cboSelectManager.Items.Clear(); cboSelectDepartment.Items.Add("Select Department"); cboSelectManager.Items.Add("Select Manager"); txtAssignedProjectID.Text = ""; txtInspectionDate.Text = ""; txtInspectorLTName.Text = ""; txtLastName.Text = ""; txtVehicleNumber.Text = ""; TheJSIEmployeeAssignedDataSet.jsiemployeeassigned.Rows.Clear(); datStartDate = TheDateSearchClass.SubtractingDays(datStartDate, 365); //loading the combos TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectDepartment.SelectedIndex = 0; TheFindEmployeeManagerForLastYearDataSet = TheEmployeeClass.FindEmployeeManagerForLastYear(datStartDate); intNumberOfRecords = TheFindEmployeeManagerForLastYearDataSet.FindEmployeeManagersForLastYear.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectManager.Items.Add(TheFindEmployeeManagerForLastYearDataSet.FindEmployeeManagersForLastYear[intCounter].FullName); } cboSelectManager.SelectedIndex = 0; }
private void LoadDepartmentComboBox() { int intCounter; int intNumberOfRecords; MainWindow.TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = MainWindow.TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; cboSelectDepartment.Items.Add("Select Department"); for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(MainWindow.TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectDepartment.SelectedIndex = 0; }
private void ResetControls() { //setting local variables; int intNumberOfRecords; int intCounter; txtEmployeeID.Text = ""; txtFirstName.Text = ""; txtLastName.Text = ""; txtPhoneNumber.Text = ""; txtEmail.Text = ""; txtPayID.Text = ""; EnableControls(true); TheFindSortedEmployeeGroupDataSet = TheEmployeeClass.FindSortedEmpoyeeGroup(); intNumberOfRecords = TheFindSortedEmployeeGroupDataSet.FindSortedEmployeeGroup.Rows.Count - 1; cboSelectGroup.Items.Clear(); cboSelectGroup.Items.Add("Select Group"); for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectGroup.Items.Add(TheFindSortedEmployeeGroupDataSet.FindSortedEmployeeGroup[intCounter].GroupName); } cboHomeOffice.Items.Clear(); cboHomeOffice.Items.Add("Select Office"); TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); intNumberOfRecords = TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboHomeOffice.Items.Add(TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboDepartment.Items.Clear(); cboDepartment.Items.Add("Select Department"); TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboManager.Items.Clear(); cboManager.Items.Add("Select Manager"); TheFindSortedEmployeeManagersDataSet = TheEmployeeClass.FindSortedEmployeeManagers(); intNumberOfRecords = TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboManager.Items.Add(TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers[intCounter].FullName); } cboSelectType.Items.Clear(); cboSelectType.Items.Add("Select Type"); cboSelectType.Items.Add("EMPLOYEE"); cboSelectType.Items.Add("CONTRACTOR"); cboSalaryType.Items.Clear(); cboSalaryType.Items.Add("Select Salary Type"); cboSalaryType.Items.Add("EXEMPT"); cboSalaryType.Items.Add("NON-EXEMPT"); cboSelectGroup.SelectedIndex = 0; cboHomeOffice.SelectedIndex = 0; cboSelectType.SelectedIndex = 0; cboSalaryType.SelectedIndex = 0; cboDepartment.SelectedIndex = 0; cboManager.SelectedIndex = 0; EnableControls(false); }
private void ResetControls() { //local variables int intCounter; int intNumberOfRecords; try { txtEmployeeID.Text = ""; txtEnterLastName.Text = ""; txtFirstName.Text = ""; txtLastName.Text = ""; txtPhoneNumber.Text = ""; txtEmailAddress.Text = ""; txtPayID.Text = ""; txtEndDate.Text = ""; txtStartDate.Text = ""; cboSelectActive.Items.Clear(); cboSelectEmployeetype.Items.Clear(); cboSelectDepartment.Items.Clear(); cboSelectEmployee.Items.Clear(); cboSelectGroup.Items.Clear(); cboSelectManager.Items.Clear(); cboSelectSalaryType.Items.Clear(); cboSelectActive.Items.Add("Select Active"); cboSelectActive.Items.Add("YES"); cboSelectActive.Items.Add("NO"); cboSelectEmployeetype.Items.Add("Select Type"); cboSelectEmployeetype.Items.Add("EMPLOYEE"); cboSelectEmployeetype.Items.Add("CONTRACTOR"); cboSelectHomeOffice.Items.Add("Select Warehouse"); cboSelectGroup.Items.Add("Select Group"); cboSelectSalaryType.Items.Add("Select Salary Type"); cboSelectSalaryType.Items.Add("EXEMPT"); cboSelectSalaryType.Items.Add("NON-EXEMPT"); MainWindow.TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); intNumberOfRecords = MainWindow.TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectHomeOffice.Items.Add(MainWindow.TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboSelectHomeOffice.SelectedIndex = 0; TheEmployeeGroupDataSet = TheEmployeeClass.GetEmployeeGroupInfo(); intNumberOfRecords = TheEmployeeGroupDataSet.employeegroup.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectGroup.Items.Add(TheEmployeeGroupDataSet.employeegroup[intCounter].GroupName); } cboSelectDepartment.Items.Add("Select Department"); MainWindow.TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = MainWindow.TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(MainWindow.TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectManager.Items.Add("Select Manager"); MainWindow.TheFindSortedEmployeeManagersDataSet = TheEmployeeClass.FindSortedEmployeeManagers(); intNumberOfRecords = MainWindow.TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectManager.Items.Add(MainWindow.TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers[intCounter].FullName); } cboSelectGroup.SelectedIndex = 0; cboSelectHomeOffice.SelectedIndex = 0; cboSelectEmployeetype.SelectedIndex = 0; cboSelectSalaryType.SelectedIndex = 0; cboSelectDepartment.SelectedIndex = 0; cboSelectManager.SelectedIndex = 0; } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Blue Jay ERP // Edit Employee // Window Loaded " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }
private void ResetControls() { //setting up local variables int intCounter; int intNumberOfRecords; bool blnFatalError; try { //clearing the text boxes txtEnterLastName.Text = ""; txtEmailAddress.Text = ""; txtEmployeeID.Text = ""; txtEndDate.Text = ""; txtFirstName.Text = ""; txtLastName.Text = ""; txtPayID.Text = ""; txtPhoneNumber.Text = ""; txtStartDate.Text = ""; //setting up the combo boxes cboSelectEmployee.Items.Clear(); cboSelectEmployee.Items.Add("Select Employee"); cboSelectEmployee.SelectedIndex = 0; //setting up the active combo box cboActive.Items.Clear(); cboActive.Items.Add("Select Active"); cboActive.Items.Add("Yes"); cboActive.Items.Add("No"); cboActive.SelectedIndex = 0; //setting up the group combo box cboGroup.Items.Clear(); cboGroup.Items.Add("Select Group"); TheFindSortedEmployeeGroupDataSet = TheEmployeeClass.FindSortedEmpoyeeGroup(); intNumberOfRecords = TheFindSortedEmployeeGroupDataSet.FindSortedEmployeeGroup.Rows.Count; for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { cboGroup.Items.Add(TheFindSortedEmployeeGroupDataSet.FindSortedEmployeeGroup[intCounter].GroupName); } cboGroup.SelectedIndex = 0; //setting ho the home office combo box cboHomeOffice.Items.Clear(); cboHomeOffice.Items.Add("Select Home Office"); TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); intNumberOfRecords = TheFindWarehousesDataSet.FindWarehouses.Rows.Count; for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { cboHomeOffice.Items.Add(TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboHomeOffice.SelectedIndex = 0; //setting employee type cboEmployeeType.Items.Clear(); cboEmployeeType.Items.Add("Select Employee Type"); cboEmployeeType.Items.Add("EMPLOYEE"); cboEmployeeType.Items.Add("CONTRACTOR"); cboEmployeeType.SelectedIndex = 0; //setting up the salary type cboSalaryType.Items.Clear(); cboSalaryType.Items.Add("Select Salary Type"); cboSalaryType.Items.Add("EXEMPT"); cboSalaryType.Items.Add("NON-EXEMPT"); cboSalaryType.SelectedIndex = 0; //setting up the combo box for departments cboDepartment.Items.Clear(); cboDepartment.Items.Add("Select Department"); TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count; for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { cboDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboDepartment.SelectedIndex = 0; //setting up the managers cboManager.Items.Clear(); cboManager.Items.Add("Select Managers"); TheFindSortedEmployeeManagersDataSet = TheEmployeeClass.FindSortedEmployeeManagers(); intNumberOfRecords = TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers.Rows.Count; for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { cboManager.Items.Add(TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers[intCounter].FullName); } cboManager.SelectedIndex = 0; EnableControls(false); blnFatalError = TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Edit Employee"); if (blnFatalError == true) { throw new Exception(); } expIsManager.IsEnabled = false; } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Edit Employee // Reset Control " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }
private void ClearControls() { //setting local variables; int intNumberOfRecords; int intCounter; txtEmployeeID.Text = ""; txtFirstName.Text = ""; txtLastName.Text = ""; txtPhoneNumber.Text = ""; txtEmailAddress.Text = ""; SetControlsReadOnly(true); MainWindow.TheFindSortedEmployeeGroupDataSet = TheEmployeeClass.FindSortedEmpoyeeGroup(); intNumberOfRecords = MainWindow.TheFindSortedEmployeeGroupDataSet.FindSortedEmployeeGroup.Rows.Count - 1; cboSelectGroup.Items.Clear(); cboSelectGroup.Items.Add("Select Group"); for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectGroup.Items.Add(MainWindow.TheFindSortedEmployeeGroupDataSet.FindSortedEmployeeGroup[intCounter].GroupName); } cboWarehouse.Items.Clear(); cboWarehouse.Items.Add("Select Warehouse"); MainWindow.TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); intNumberOfRecords = MainWindow.TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboWarehouse.Items.Add(MainWindow.TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboSelectDepartment.Items.Clear(); cboSelectDepartment.Items.Add("Select Department"); MainWindow.TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = MainWindow.TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(MainWindow.TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectManager.Items.Clear(); cboSelectManager.Items.Add("Select Manager"); MainWindow.TheFindSortedEmployeeManagersDataSet = TheEmployeeClass.FindSortedEmployeeManagers(); intNumberOfRecords = MainWindow.TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectManager.Items.Add(MainWindow.TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers[intCounter].FullName); } cboEmployeeType.Items.Clear(); cboEmployeeType.Items.Add("Select Type"); cboEmployeeType.Items.Add("EMPLOYEE"); cboEmployeeType.Items.Add("CONTRACTOR"); cboSelectSalaryType.Items.Clear(); cboSelectSalaryType.Items.Add("Select Salary Type"); cboSelectSalaryType.Items.Add("EXEMPT"); cboSelectSalaryType.Items.Add("NON-EXEMPT"); cboSelectGroup.SelectedIndex = 0; cboWarehouse.SelectedIndex = 0; cboEmployeeType.SelectedIndex = 0; cboSelectSalaryType.SelectedIndex = 0; cboSelectDepartment.SelectedIndex = 0; cboSelectManager.SelectedIndex = 0; SetControlsReadOnly(true); }
private void ResetControls() { //setting local variables int intCounter; int intNumberOfRecords; try { txtAssignedProjectID.Text = ""; txtJobNumber.Text = ""; txtRequestDate.Text = Convert.ToString(DateTime.Now); txtRequestNotes.Text = ""; txtRequiredDate.Text = ""; cboSelectManager.Items.Clear(); cboSelectDepartment.Items.Clear(); cboSelectOffice.Items.Clear(); cboSelectVendor.Items.Clear(); chkRequestPurchase.IsChecked = false; chkRequestQuote.IsChecked = false; gintEmployeeID = MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID; //loading up the combo boxes TheFindSortedEmployeeManagersDataSet = TheEmployeeClass.FindSortedEmployeeManagers(); intNumberOfRecords = TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers.Rows.Count - 1; cboSelectManager.Items.Add("Select Manager"); for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectManager.Items.Add(TheFindSortedEmployeeManagersDataSet.FindSortedEmployeeManagers[intCounter].FullName); } cboSelectManager.SelectedIndex = 0; cboSelectDepartment.Items.Add("Select Department"); TheFindSortedDepartmentDataSet = TheDepartmentClass.FindSortedDepartment(); intNumberOfRecords = TheFindSortedDepartmentDataSet.FindSortedDepartment.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectDepartment.Items.Add(TheFindSortedDepartmentDataSet.FindSortedDepartment[intCounter].Department); } cboSelectDepartment.SelectedIndex = 0; cboSelectOffice.Items.Add("Select Office"); TheFindWarehousesDataSet = TheEmployeeClass.FindWarehouses(); intNumberOfRecords = TheFindWarehousesDataSet.FindWarehouses.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectOffice.Items.Add(TheFindWarehousesDataSet.FindWarehouses[intCounter].FirstName); } cboSelectOffice.SelectedIndex = 0; cboSelectVendor.Items.Add("Select Vendor"); TheFindSortedVendorsDataSet = TheVendorsClass.FindVendorsSortedByVendorName(); intNumberOfRecords = TheFindSortedVendorsDataSet.FindVendorsSortedByVendorName.Rows.Count - 1; for (intCounter = 0; intCounter <= intNumberOfRecords; intCounter++) { cboSelectVendor.Items.Add(TheFindSortedVendorsDataSet.FindVendorsSortedByVendorName[intCounter].VendorName); } cboSelectVendor.SelectedIndex = 0; } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Create Purchase Request // Reset Controls " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }