123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Common.Students.HighBaseTable;
- using EMIS.Entities;
- namespace EMIS.CommonLogic.Students.HighBaseTable
- {
- public class RecruitTerritorialReportServices : BaseServices, IRecruitTerritorialReportServices
- {
- public RecruitTerritorialReportDAL RecruitTerritorialReportDAL { get; set; }
- public void GenerateReport(int year)
- {
- var insertList = new List<HB_RecruitTerritorialReport>();
- var recruitTerritorialReportList = RecruitTerritorialReportDAL.GetRecruitTerritorialReportView(year).ToList();
- this.UnitOfWork.Delete<HB_RecruitTerritorialReport>(x => x.Year == year);
- recruitTerritorialReportList.ForEach(x =>
- {
- var recruitTerritorialReport = new HB_RecruitTerritorialReport
- {
- RecruitTerritorialReportID = Guid.NewGuid(),
- Year = year,
- Territorial = x.Territorial,
- EducationTypeID = x.EducationTypeID,
- RecruitCategoryID = x.RecruitCategoryID,
- IsFreshGraduate = x.IsFreshGraduate,
- IsCountry = x.IsCountry,
- RecruitCount = x.RecruitCount
- };
- this.SetNewStatus(recruitTerritorialReport);
- insertList.Add(recruitTerritorialReport);
- });
- this.UnitOfWork.BulkInsert(insertList);
- }
- }
- }
|