Exemplo n.º 1
0
        public void GenerateSummaryFiles(EMailData emailData)
        {
            if (SuccessfulUsersProcessed.Count > 0)
            {
                SuccessfulUsersProcessed = SuccessfulUsersProcessed.OrderBy(o => o.LastName).ThenBy(t => t.FirstName).ToList();

                emailData.HRSuccessfulFilename = SummaryFileGenerator.GenerateSummaryFile <ProcessedSummary, ProcessedSummaryMapping>(ConfigurationManager.AppSettings["SUCCESSSUMMARYFILENAME"].ToString(), SuccessfulUsersProcessed);
                log.Info("HR Success File: " + emailData.HRSuccessfulFilename);
            }

            if (UnsuccessfulUsersProcessed.Count > 0)
            {
                UnsuccessfulUsersProcessed = UnsuccessfulUsersProcessed.OrderBy(o => o.LastName).ThenBy(t => t.FirstName).ToList();

                emailData.HRUnsuccessfulFilename = SummaryFileGenerator.GenerateSummaryFile <ProcessedSummary, ProcessedSummaryMapping>(ConfigurationManager.AppSettings["ERRORSUMMARYFILENAME"].ToString(), UnsuccessfulUsersProcessed);
                log.Info("HR Error File: " + emailData.HRUnsuccessfulFilename);
            }

            if (IdenticalRecords.Count > 0)
            {
                IdenticalRecords = IdenticalRecords.OrderBy(o => o.LastName).ThenBy(t => t.FirstName).ToList();

                emailData.HRIdenticalFilename = SummaryFileGenerator.GenerateSummaryFile <IdenticalRecordSummary, IdenticalRecordSummaryMapping>(ConfigurationManager.AppSettings["IDENTICALSUMMARYFILENAME"].ToString(), IdenticalRecords);
                log.Info("HR Identical File:" + emailData.HRIdenticalFilename);
            }

            if (SocialSecurityNumberChanges.Count > 0)
            {
                SocialSecurityNumberChanges = SocialSecurityNumberChanges.OrderBy(o => o.LastName).ThenBy(t => t.FirstName).ToList();

                emailData.HRSocialSecurityNumberChangeFilename = SummaryFileGenerator.GenerateSummaryFile <SocialSecurityNumberChangeSummary, SocialSecurityNumberChangeSummaryMapping>(ConfigurationManager.AppSettings["SOCIALSECURITYNUMBERCHANGESUMMARYFILENAME"].ToString(), SocialSecurityNumberChanges);
                log.Info("HR Social Security Number Change File: " + emailData.HRSocialSecurityNumberChangeFilename);
            }

            if (InactiveRecords.Count > 0)
            {
                InactiveRecords = InactiveRecords.OrderBy(o => o.LastName).ThenBy(t => t.FirstName).ToList();

                emailData.HRInactiveFilename = SummaryFileGenerator.GenerateSummaryFile <InactiveSummary, InactiveSummaryMapping>(ConfigurationManager.AppSettings["INACTIVESUMMARYFILENAME"].ToString(), InactiveRecords);
                log.Info("HR Inactive File: " + emailData.HRInactiveFilename);
            }

            if (RecordsNotFound.Count > 0)
            {
                RecordsNotFound = RecordsNotFound.OrderBy(o => o.LastName).ThenBy(t => t.FirstName).ToList();

                emailData.HRRecordsNotFoundFileName = SummaryFileGenerator.GenerateSummaryFile <RecordNotFoundSummary, RecordNotFoundSummaryMapping>(ConfigurationManager.AppSettings["RECORDNOTFOUNDSUMMARYFILENAME"].ToString(), RecordsNotFound);
                log.Info("HR Name Not Found File: " + emailData.HRRecordsNotFoundFileName);
            }
        }
Exemplo n.º 2
0
        public void GenerateSummaryFiles(EMailData emailData)
        {
            if (SuccessfulUsersProcessed.Count > 0)
            {
                SuccessfulUsersProcessed = SuccessfulUsersProcessed.OrderBy(o => o.EmployeeID).ToList();

                emailData.SeparationSuccessfulFilename = SummaryFileGenerator.GenerateSummaryFile <SeparationSummary, SeperationSummaryMapping>(ConfigurationManager.AppSettings["SEPARATIONSUMMARYFILENAME"].ToString(), SuccessfulUsersProcessed);
                log.Info("Separation Success File: " + emailData.SeparationSuccessfulFilename);
            }

            if (UnsuccessfulUsersProcessed.Count > 0)
            {
                UnsuccessfulUsersProcessed = UnsuccessfulUsersProcessed.OrderBy(o => o.EmployeeID).ToList();

                emailData.SeparationErrorFilename = SummaryFileGenerator.GenerateSummaryFile <SeparationSummary, SeperationErrorMapping>(ConfigurationManager.AppSettings["SEPARATIONERRORSUMMARYFILENAME"].ToString(), UnsuccessfulUsersProcessed);
                log.Info("Separation Error File: " + emailData.SeparationErrorFilename);
            }
        }