public static TeacherCourseResourceModel MapModel(Entities.TEACHING teaching, Entities.RESOURCE resource, Entities.COURSE course)
 {
     return(new TeacherCourseResourceModel
     {
         ID = teaching.ID,
         ID_Resource = teaching.ID_Resource,
         ID_Course = teaching.ID_Course,
         Notes = teaching.Notes,
         ResourceModel = ResourceModel.MapModel(resource),
         CourseModel = CourseModel.MapModel(course)
     });
 }
Exemple #2
0
 public static Entities.RESOURCE MapEntities(ResourceModel model)
 {
     return(new Entities.RESOURCE
     {
         ID = model.ID,
         UserName = model.UserName,
         Name = model.Name,
         Surname = model.Surname,
         IsAvaiable = model.IsAvaiable,
         IsCP = model.IsCP,
         IsTeacher = model.IsTeacher
     });
 }
Exemple #3
0
        public static SubscriptionCourseResourceModel MapModel(Entities.SUBSCRIPTION sub, Entities.COURSE course, Entities.RESOURCE resource, Entities.RESOURCE cp)
        {
            SubscriptionCourseResourceModel result = new SubscriptionCourseResourceModel();

            //map Subscription
            result.ID          = sub.ID;
            result.ID_Course   = sub.ID_Course;
            result.ID_CP       = sub.ID_CP;
            result.ID_Resource = sub.ID_Resource;
            result.StartDate   = sub.StartDate;
            result.MaxEndDate  = sub.MaxEndDate;
            result.IsAdmitted  = sub.IsAdmitted;
            result.Notes       = sub.Notes;
            //map Course
            result.CourseModel = CourseModel.MapModel(course);
            //map Resources
            result.ResourceModel = ResourceModel.MapModel(resource);
            //map Cp
            result.CpModel = ResourceModel.MapModel(cp);

            return(result);
        }