public static void AddStudent(Student temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         conn.Students.InsertOnSubmit(temp);
         conn.SubmitChanges();
     }
 }
 public static void AddInstructor(Instructor temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         conn.Instructors.InsertOnSubmit(temp);
         conn.SubmitChanges();
     }
 }
 public static void AddCourse(Course temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         conn.Courses.InsertOnSubmit(temp);
         conn.SubmitChanges();
     }
 }
 public static void Add(C_taken temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         conn.C_takens.InsertOnSubmit(temp);
         conn.SubmitChanges();
     }
 }
 public static void DeleteInstructor(Instructor temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         var toDelete = from su in conn.Instructors
                        where su.insid == temp.insid
                        select su;
         conn.Instructors.DeleteAllOnSubmit(toDelete);
         conn.SubmitChanges();
     }
 }
 public static void DeleteCourse(Course temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         var toDelete = from su in conn.Courses
                        where su.cid == temp.cid
                        select su;
         conn.Courses.DeleteAllOnSubmit(toDelete);
         conn.SubmitChanges();
     }
 }
 public static void Withdraw(C_taken temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         var toDelete = from su in conn.C_takens
                        where su.sid == temp.sid
                        select su;
         conn.C_takens.DeleteAllOnSubmit(toDelete);
         conn.SubmitChanges();
     }
 }
 public static void DeleteStudent(Student temp)
 {
     using (UniversityDataDataContext conn = new UniversityDataDataContext())
     {
         var toDelete = from su in conn.Students
                        where su.sid == temp.sid
                        select su;
         conn.Students.DeleteAllOnSubmit(toDelete);
         conn.SubmitChanges();
     }
 }