示例#1
0
 private DTO.LABURNUM.COM.FacultyModel MapCore(API.LABURNUM.COM.Faculty apifaculty)
 {
     DTO.LABURNUM.COM.FacultyModel dtoFaculty = new DTO.LABURNUM.COM.FacultyModel()
     {
         FacultyId        = apifaculty.FacultyId,
         FacultyName      = apifaculty.FacultyName,
         UserName         = apifaculty.UserName,
         Password         = apifaculty.Password,
         ClassId          = apifaculty.ClassId != null ? apifaculty.ClassId : null,
         SectionId        = apifaculty.SectionId != null ? apifaculty.SectionId : null,
         UserTypeId       = apifaculty.UserTypeId,
         IsClassTeacher   = apifaculty.IsClassTeacher,
         UserTypeText     = apifaculty.UserType.Text,
         ClassName        = apifaculty.ClassId != null ? apifaculty.Class.ClassName : "",
         SectionName      = apifaculty.SectionId != null ? apifaculty.Section.SectionName : "",
         IsSubjectTeacher = apifaculty.IsSubjectTeacher,
         SubjectId        = apifaculty.SubjectId != null ? apifaculty.SubjectId : null,
         SubjectName      = apifaculty.SubjectId != null ? apifaculty.Subject.SubjectName : "",
         CreatedOn        = apifaculty.CreatedOn,
         Email            = apifaculty.Email,
         ContactNumber    = apifaculty.ContactNumber,
         Photo            = apifaculty.Photo,
         IsActive         = apifaculty.IsActive,
         LastUpdated      = apifaculty.LastUpdated
     };
     return(dtoFaculty);
 }
示例#2
0
 public FacultyHelper(API.LABURNUM.COM.Faculty faculty)
 {
     if (faculty == null)
     {
         throw new Exception(API.LABURNUM.COM.Component.Constants.ERRORMESSAGES.PARAMETER_CANNOT_BE_NULL);
     }
     ;
     this.Faculties = new List <API.LABURNUM.COM.Faculty>();
     this.Faculties.Add(faculty);
 }
示例#3
0
 private DTO.LABURNUM.COM.FacultyModel MapCore(API.LABURNUM.COM.Faculty apifaculty)
 {
     DTO.LABURNUM.COM.FacultyModel dtoFaculty = new DTO.LABURNUM.COM.FacultyModel()
     {
         FacultyId   = apifaculty.FacultyId,
         FacultyName = apifaculty.FacultyName,
         UserName    = apifaculty.UserName,
         Password    = apifaculty.Password,
         CreatedOn   = apifaculty.CreatedOn,
         IsActive    = apifaculty.IsActive,
         LastUpdated = apifaculty.LastUpdated
     };
     return(dtoFaculty);
 }