예제 #1
0
 public CurriculumHelper(API.LABURNUM.COM.Curriculum Curriculum)
 {
     if (Curriculum == null)
     {
         throw new Exception(API.LABURNUM.COM.Component.Constants.ERRORMESSAGES.PARAMETER_CANNOT_BE_NULL);
     }
     ;
     this.Curriculums = new List <API.LABURNUM.COM.Curriculum>();
     this.Curriculums.Add(Curriculum);
 }
예제 #2
0
 private DTO.LABURNUM.COM.CurriculumModel MapCore(API.LABURNUM.COM.Curriculum Curriculum)
 {
     DTO.LABURNUM.COM.CurriculumModel dtoClass = new DTO.LABURNUM.COM.CurriculumModel()
     {
         CurriculumId      = Curriculum.CurriculumId,
         AcademicYearId    = Curriculum.AcademicYearId,
         ClassId           = Curriculum.ClassId,
         AddedById         = Curriculum.AddedById,
         AddedByName       = Curriculum.Faculty.FacultyName,
         UpdatedByName     = Curriculum.UpdatedById != null ? Curriculum.Faculty1.FacultyName : "",
         MonthId           = Curriculum.MonthId,
         CurriculumDetails = new CurriculumDetailHelper(Curriculum.CurriculumDetails.Where(x => x.IsActive == true).ToList()).Map(),
         AcademicYearText  = Curriculum.AcademicYearTable.StartYear + "-" + Curriculum.AcademicYearTable.EndYear,
         MonthName         = Curriculum.MonthId != null ? Curriculum.Month.MonthName : "",
         ClassName         = Curriculum.Class.ClassName,
         CreatedOn         = Curriculum.CreatedOn,
         IsActive          = Curriculum.IsActive,
         LastUpdated       = Curriculum.LastUpdated,
     };
     return(dtoClass);
 }