private void btnFindHours_Click(object sender, RoutedEventArgs e) { string strValueForValidation; bool blnFatalError = false; DateTime datStartDate; DateTime datEndDate; try { strValueForValidation = txtEnterPayPeriod.Text; blnFatalError = TheDataValidationClass.VerifyDateData(strValueForValidation); if (blnFatalError == true) { TheMessagesClass.ErrorMessage("The Date entered is not a Date"); return; } MainWindow.gdatPayDate = Convert.ToDateTime(strValueForValidation); datStartDate = TheDateSearchClass.SubtractingDays(MainWindow.gdatPayDate, 6); datEndDate = TheDateSearchClass.AddingDays(MainWindow.gdatPayDate, 1); TheFindAholaEmployeePunchesPossiblyBadDataSet = TheEmployeePunchedHourClass.FindAlohaEmployeePunchesPossiblyBad(datStartDate, datEndDate); dgrHours.ItemsSource = TheFindAholaEmployeePunchesPossiblyBadDataSet.FindAlohaEmployeePunchesPossiblyBad; } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Edit Employee Hours // Find Hours Button " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }
private void ResetControls() { txtEnterPayPeriod.Text = ""; TheFindAholaEmployeePunchesPossiblyBadDataSet = TheEmployeePunchedHourClass.FindAlohaEmployeePunchesPossiblyBad(DateTime.Now, DateTime.Now); dgrHours.ItemsSource = TheFindAholaEmployeePunchesPossiblyBadDataSet.FindAlohaEmployeePunchesPossiblyBad; TheEmployeeDateEntryClass.InsertIntoEmployeeDateEntry(MainWindow.TheVerifyLogonDataSet.VerifyLogon[0].EmployeeID, "New Blue Jay ERP // Edit Employee Hours"); }
public FindAlohaEmployeePunchesPossiblyBadDataSet FindAlohaEmployeePunchesPossiblyBad(DateTime datStartDate, DateTime datEndDate) { try { aFindAlohaEmployeePunchesPossiblyBadDataSet = new FindAlohaEmployeePunchesPossiblyBadDataSet(); aFindAlohaEmployeePunchesPossiblyBadTableAdapter = new FindAlohaEmployeePunchesPossiblyBadDataSetTableAdapters.FindAlohaEmployeePunchesPossiblyBadTableAdapter(); aFindAlohaEmployeePunchesPossiblyBadTableAdapter.Fill(aFindAlohaEmployeePunchesPossiblyBadDataSet.FindAlohaEmployeePunchesPossiblyBad, datStartDate, datEndDate); } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Employee Punched Hours Class // Find Aloha Employee Punches Possibly Bad " + Ex.Message); } return(aFindAlohaEmployeePunchesPossiblyBadDataSet); }