public FindAholaClockPunchesForVerificationDataSet FindAholaClockPunchesForVerification(int intPayID, DateTime datActualDateTime, DateTime datPunchDateTime, DateTime datCreatedDateTime, string strPunchIPAddress) { try { aFindAholaClockPunchesForVerificationDataSet = new FindAholaClockPunchesForVerificationDataSet(); aFindAholaClockPunchesForVerificationTableAdapter = new FindAholaClockPunchesForVerificationDataSetTableAdapters.FindAholaClockPunchesForVerificationTableAdapter(); aFindAholaClockPunchesForVerificationTableAdapter.Fill(aFindAholaClockPunchesForVerificationDataSet.FindAholaClockPunchesForVerification, intPayID, datActualDateTime, datPunchDateTime, datCreatedDateTime, strPunchIPAddress); } catch (Exception Ex) { TheEventLogClass.InsertEventLogEntry(DateTime.Now, "Employee Punched Hours Class // Find Ahola Clock Punches For Verification " + Ex.Message); } return(aFindAholaClockPunchesForVerificationDataSet); }
private void expProcessData_Expanded(object sender, RoutedEventArgs e) { int intNumberOfRecords; int intCounter; int intPayID; int intEmployeeID; DateTime datActualDateTime; DateTime datPunchDateTime; DateTime datCreatedDateTime; string strPayGroup; string strPunchMode; string strPunchType; string strPunchUser; string strPunchIPAddress; DateTime datLastUpdate; bool blnFatalError = false; int intRecordsReturned; string strPunchSource; try { expProcessData.IsExpanded = false; intNumberOfRecords = TheImportAholaPunchesDataSet.importaholapunches.Rows.Count; PleaseWait PleaseWait = new PleaseWait(); PleaseWait.Show(); if (intNumberOfRecords > 0) { for (intCounter = 0; intCounter < intNumberOfRecords; intCounter++) { intPayID = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PayID; intEmployeeID = TheImportAholaPunchesDataSet.importaholapunches[intCounter].EmployeeID; datActualDateTime = TheImportAholaPunchesDataSet.importaholapunches[intCounter].ActualDateTime; datPunchDateTime = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PunchDateTime; datCreatedDateTime = TheImportAholaPunchesDataSet.importaholapunches[intCounter].CreatedDateTime; strPayGroup = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PayGroup; strPunchMode = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PunchMode; strPunchType = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PunchType; strPunchSource = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PunchSource; strPunchUser = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PunchUser; strPunchIPAddress = TheImportAholaPunchesDataSet.importaholapunches[intCounter].PunchIPAddress; datLastUpdate = TheImportAholaPunchesDataSet.importaholapunches[intCounter].LastUpdate; TheFindAholaClockPunchesForVerificationDataSet = TheEmployeePunchedHoursClass.FindAholaClockPunchesForVerification(intPayID, datActualDateTime, datPunchDateTime, datCreatedDateTime, strPunchIPAddress); intRecordsReturned = TheFindAholaClockPunchesForVerificationDataSet.FindAholaClockPunchesForVerification.Rows.Count; if (intRecordsReturned < 1) { blnFatalError = TheEmployeePunchedHoursClass.InsertAholaClockPunches(intEmployeeID, intPayID, datActualDateTime, datPunchDateTime, datCreatedDateTime, strPayGroup, strPunchMode, strPunchType, strPunchSource, strPunchUser, strPunchIPAddress, datLastUpdate); if (blnFatalError == true) { throw new Exception(); } } } } PleaseWait.Close(); TheMessagesClass.InformationMessage("All Records Have Been Inserted"); expCalculateHours.IsEnabled = true; } catch (Exception Ex) { TheSendEmailClass.SendEventLog("New Blue Jay ERP // Import Employee Punches // Process Data Expander " + Ex.ToString()); TheEventLogClass.InsertEventLogEntry(DateTime.Now, "New Blue Jay ERP // Import Employee Punches // Process Data Expander " + Ex.Message); TheMessagesClass.ErrorMessage(Ex.ToString()); } }