Esempio n. 1
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);
            }
        }
Esempio n. 2
0
        public void GenerateSummaryFiles(EMailData emailData)
        {
            if (CreatedRecordsProcessed.Count > 0)
            {
                CreatedRecordsProcessed = CreatedRecordsProcessed.OrderBy(o => o.MonsterID).ToList();

                emailData.CreatedRecordFilename = SummaryFileGenerator.GenerateSummaryFile <CreatedSummary, CreatedSummaryMapping>(ConfigurationManager.AppSettings["CREATEDSUMMARYFILENAME"].ToString(), CreatedRecordsProcessed);

                Log.Info("Created File: " + emailData.CreatedRecordFilename);
            }

            if (UpdatedRecordsProcessed.Count > 0)
            {
                UpdatedRecordsProcessed = UpdatedRecordsProcessed.OrderBy(o => o.MonsterID).ToList();

                emailData.UpdatedRecordFilename = SummaryFileGenerator.GenerateSummaryFile <UpdatedSummary, UpdatedSummaryMapping>(ConfigurationManager.AppSettings["UPDATEDSUMMARYFILENAME"].ToString(), UpdatedRecordsProcessed);

                Log.Info("Updated File: " + emailData.UpdatedRecordFilename);
            }

            if (FlaggedRecordsProcessed.Count > 0)
            {
                FlaggedRecordsProcessed = FlaggedRecordsProcessed.OrderBy(o => o.MonsterID).ToList();

                emailData.FlaggRecordFilename = SummaryFileGenerator.GenerateSummaryFile <FlaggedSummary, FlaggedSummaryMapping>(ConfigurationManager.AppSettings["FLAGGEDSUMMARYFILENAME"].ToString(), FlaggedRecordsProcessed);

                Log.Info("Flagged File: " + emailData.FlaggRecordFilename);
            }

            if (UnsuccessfulProcessed.Count > 0)
            {
                UnsuccessfulProcessed = UnsuccessfulProcessed.OrderBy(o => o.MonsterID).ToList();

                emailData.ErrorFilename = SummaryFileGenerator.GenerateSummaryFile <ErrorSummary, ErrorSummaryMapping>(ConfigurationManager.AppSettings["ERRORSUMMARYFILENAME"].ToString(), UnsuccessfulProcessed);

                Log.Info("Error File: " + emailData.ErrorFilename);
            }
        }
Esempio n. 3
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);
            }
        }