// Insert new Specialization public bool Insert(Specialization aSpecialization) { try { db.Specializations.InsertOnSubmit(aSpecialization); db.SubmitChanges(); return(true); } catch (Exception ex) { return(false); throw new Exception("SpecializationBO.Select_ByFacultyCode" + ex.ToString()); } }
// Insert new Student public bool Insert(Student aStudent) { try { db.Students.InsertOnSubmit(aStudent); db.SubmitChanges(); return(true); } catch (Exception ex) { return(false); throw new Exception("StudentBO.Insert:" + ex.ToString()); } }
// Insert public bool Insert(Term aTerm) { try { db.Terms.InsertOnSubmit(aTerm); db.SubmitChanges( ); return(true); } catch (Exception ex) { return(false); throw new Exception("TermBO.Insert" + ex.ToString( )); } }
//Insert new TimeTableCourse public bool Insert(TimeTableCourse aTimeTableCourse) { try { db.TimeTableCourses.InsertOnSubmit(aTimeTableCourse); db.SubmitChanges(); return(true); } catch (Exception ex) { return(false); throw new Exception("TimeTableCourseBO.Insert" + ex.ToString()); } }
// insert new Faculty public bool Insert(Faculty aFaculty) { try { db.Faculties.InsertOnSubmit(aFaculty); db.SubmitChanges(); return(true); } catch (Exception ex) { return(false); throw new Exception("FacultyBO.Insert: " + ex.ToString()); } }
// Insert -- Register public bool Insert(User aUser) { try { // encrypt password aUser.Use_Password = ToSHA1(aUser.Use_Password); db.Users.InsertOnSubmit(aUser); db.SubmitChanges(); return(true); } catch (Exception ex) { return(false); throw new Exception("UserBO.Insert" + ex.ToString()); } }