Ejemplo n.º 1
0
 public AttendanceClass2Helper(API.LABURNUM.COM.AttendanceClass2 Class)
 {
     if (Class == null)
     {
         throw new Exception(API.LABURNUM.COM.Component.Constants.ERRORMESSAGES.PARAMETER_CANNOT_BE_NULL);
     }
     ;
     this.AttendanceClass2 = new List <API.LABURNUM.COM.AttendanceClass2>();
     this.AttendanceClass2.Add(Class);
 }
Ejemplo n.º 2
0
 private DTO.LABURNUM.COM.AttendanceClass2Model MapCore(API.LABURNUM.COM.AttendanceClass2 apiclass)
 {
     DTO.LABURNUM.COM.AttendanceClass2Model dtoClass = new DTO.LABURNUM.COM.AttendanceClass2Model()
     {
         AttendanceClass2Id    = apiclass.AttendanceClass2Id,
         ClassId               = apiclass.ClassId,
         SectionId             = apiclass.SectionId,
         StudentId             = apiclass.StudentId,
         MorningAttendanceDate = apiclass.MorningAttendanceDate,
         LunchAttendanceDate   = apiclass.LunchAttendanceDate.GetValueOrDefault().Year != 0001 ? apiclass.LunchAttendanceDate : null,
         IsPresentAfterLuch    = apiclass.IsPresentAfterLuch,
         IsPresentInMorning    = apiclass.IsPresentInMorning,
         CreatedOn             = apiclass.CreatedOn,
         IsActive              = apiclass.IsActive,
         LastUpdated           = apiclass.LastUpdated,
         StudentName           = apiclass.Student.FirstName + " " + apiclass.Student.MiddleName + " " + apiclass.Student.LastName,
         FatherName            = apiclass.Student.FatherName,
         AttendanceId          = apiclass.AttendanceClass2Id,
     };
     return(dtoClass);
 }