Esempio n. 1
0
 public StudyPlanManage(Data.Entity.StudyPlan studyPlan)
 {
     if (studyPlan != null)
     {
         ID        = studyPlan.PlanId;
         StudyPlan = studyPlan;
     }
 }
Esempio n. 2
0
 public StudyPlanResponse(Data.Entity.StudyPlan plan)
 {
     if (plan != null)
     {
         PlanId     = plan.PlanId;
         UserId     = plan.UserId;
         Student    = plan.Student;
         Title      = plan.Title;
         Content    = plan.Content;
         Status     = plan.Status;
         CreateTime = plan.CreateTime;
     }
 }
Esempio n. 3
0
        public NewStudyPlan(long userId, string title, string content, IEnumerable <long> courseIds, IEnumerable <long> studentIds)
        {
            ID          = IDProvider.NewId;
            _courseIds  = courseIds;
            _studentIds = studentIds;

            _studyPlan = new Data.Entity.StudyPlan
            {
                Content                           = content,
                CreateTime                        = DateTime.Now,
                PlanId                            = ID,
                Status                            = (int)StudyPlanStatus.ENABLED,
                Student                           = studentIds != null?studentIds.Count() : 0,
                                           Title  = title,
                                           UserId = userId
            };
        }
Esempio n. 4
0
 public StudyPlanManage(long planId)
 {
     ID        = planId;
     StudyPlan = StudyPlanAccessor.Get(planId);
 }