Esempio n. 1
0
        public void insertStudentStudyPlan(int StudentId, int PlanId, int Status)
        {
            StudentStudyPlan sPlan = new StudentStudyPlan(StudentId, PlanId, DateTime.Now, DateTime.Now, Status);//(Name, ParameterSetId, DateTime.Now, DateTime.Now, Status);

            var vsa = new VirtualAdvisorContext();

            vsa.StudentStudyPlan.Add(sPlan);
            vsa.SaveChanges();
        }
Esempio n. 2
0
        public int insertPlan(string Name, int ParameterSetId, int Status)
        {
            GeneratedPlan gPlan = new GeneratedPlan(Name, ParameterSetId, DateTime.Now, DateTime.Now, Status);

            var vsa = new VirtualAdvisorContext();

            vsa.GeneratedPlan.Add(gPlan);
            vsa.SaveChanges();
            int PlanId = gPlan.Id;

            return(PlanId);
        }
Esempio n. 3
0
        public void insertStudyPlan(List <StudyPlan> studyPlan)
        {
            int count = studyPlan.Count;

            StudyPlan[] newStudyPlan = new StudyPlan[count];
            for (int i = 0; i < count; i++)
            {
                newStudyPlan[i] = studyPlan[i];
            }

            var vsa = new VirtualAdvisorContext();

            vsa.AddRange(newStudyPlan);
            vsa.SaveChanges();
        }