public FindEmployeeManagerForLastYearDataSet FindEmployeeManagerForLastYear(DateTime datStartDate) { try { aFindEmployeeManagerForLastYearDataSet = new FindEmployeeManagerForLastYearDataSet(); aFindEmployeeManagerForLastYearTableAdapter = new FindEmployeeManagerForLastYearDataSetTableAdapters.FindEmployeeManagersForLastYearTableAdapter(); aFindEmployeeManagerForLastYearTableAdapter.Fill(aFindEmployeeManagerForLastYearDataSet.FindEmployeeManagersForLastYear, datStartDate); } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Employee Class // Find Employee Manager For Last Year " + Ex.Message); } return(aFindEmployeeManagerForLastYearDataSet); }
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; }