public void thisisMadness(string i) { Course newcourse = new Course(); if (i.Split('.').Length < 2) { return; } newcourse.Number = i.Split('.')[0]; newcourse.Name = i.Split('.')[1]; newcourse.PrerequisiteDescription = Regex.Match(i,@"(Prerequisite|Prerequisites)\:(\s*\d*\w*)*.").ToString(); String x = Regex.Match(i, @"(Credit)\s\d").ToString(); Console.WriteLine("The Hours value is:" + x.Substring(x.Length - 1)); Console.WriteLine(); //Console.WriteLine(myshort); //.Substring().Trim()ewcourse.Hours = myshort; newcourse.Department = new Department(); newcourse.Department.Name= _departmentname; SemestersOffered s = new SemestersOffered(); s.EvenYearFall = true; s.EvenYearSpring = true; s.EvenYearSummer = true; s.OddYearFall = true; s.OddYearSpring = true; s.OddYearSummer = true; newcourse.SemestersOffered = s; allCourses.Add(newcourse); }
partial void UpdateCourse(Course instance);
partial void DeleteCourse(Course instance);
partial void InsertCourse(Course instance);
private void detach_Courses(Course entity) { this.SendPropertyChanging(); entity.SemestersOffered = null; }
private void detach_Courses(Course entity) { this.SendPropertyChanging(); entity.Department = null; }
private void attach_Courses(Course entity) { this.SendPropertyChanging(); entity.Department = this; }
public CourseModel(Course c) { _course = c; populate(); }