123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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 FacultymajorStudentCountServices : BaseServices, IFacultymajorStudentCountServices
- {
- public FacultymajorStudentCountDAL FacultymajorStudentCountDAL { get; set; }
- public void GenerateReport(int year)
- {
- var insertList = new List<HB_FacultymajorStudentCount>();
- var facultyStudentCountList = FacultymajorStudentCountDAL.GetFacultymajorStudentCountViewQueryable(year).ToList();
- this.UnitOfWork.Delete<HB_FacultymajorStudentCount>(x => x.Year == year);
- facultyStudentCountList.ForEach(x =>
- {
- var facultyStudentCount = new HB_FacultymajorStudentCount
- {
- FacultymajorStudentCountID = Guid.NewGuid(),
- Year = year,
- EducationTypeID = x.EducationTypeID,
- StandardID = x.StandardID,
- FacultymajorID = x.FacultymajorID,
- Sex = x.SexID,
- LastGraduateCount = x.LastGraduateCount,
- RecruitstudentsCount = x.RecruitstudentsCount,
- FreshGraduateCount = x.FreshGraduateCount,
- GradeOneCount = x.GradeOneCount,
- GradeTwoCount = x.GradeTwoCount,
- GradeThreeCount = x.GradeThreeCount,
- AfterGradeFourCount = x.AfterGradeFourCount,
- PlanGraduateCount = x.PlanGraduateCount
- };
- this.SetNewStatus(facultyStudentCount);
- insertList.Add(facultyStudentCount);
- });
- this.UnitOfWork.BulkInsert(insertList);
- }
- }
- }
|