Esempio n. 1
0
 public static Entities.COURSE MapEntities(CourseModel model)
 {
     return(new Entities.COURSE
     {
         ID = model.ID,
         Title = model.Title,
         Description = model.Description,
         RefYear = model.RefYear,
         StartDate = model.StartDate,
         EndDate = model.EndDate,
         IsCircular = model.IsCircular,
         ID_Coordinator = model.ID_Coordinator
     });
 }
Esempio n. 2
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);
        }