예제 #1
0
파일: Admin.cs 프로젝트: mxolisiwood/School
 public static void AddStudent(student_t student)
 {
     using (SchoolDataDataContext data = new SchoolDataDataContext())
     {
         data.student_ts.InsertOnSubmit(student);
         data.SubmitChanges();
     }
 }
예제 #2
0
파일: Admin.cs 프로젝트: mxolisiwood/School
 public static void DeleteStudent(student_t student)
 {
     using (SchoolDataDataContext data = new SchoolDataDataContext())
     {
         student_t st = (from s in data.student_ts
                         where s.studentID == student.studentID
                         select s).FirstOrDefault();
         data.student_ts.DeleteOnSubmit(st);
         data.SubmitChanges();
     }
 }
예제 #3
0
파일: Admin.cs 프로젝트: mxolisiwood/School
 public static void UpdateStudent(student_t student)
 {
     using (SchoolDataDataContext data = new SchoolDataDataContext())
     {
         student_t st = (from s in data.student_ts where s.studentID == student.studentID
                         select s).FirstOrDefault();
         st.first_name = student.first_name;
         st.last_name  = student.last_name;
         st.gender     = student.gender;
         st.gpa        = student.gpa;
         data.SubmitChanges();
     }
 }
예제 #4
0
 partial void Deletestudent_t(student_t instance);
예제 #5
0
 partial void Updatestudent_t(student_t instance);
예제 #6
0
 partial void Insertstudent_t(student_t instance);