public void submitFeedback(int stuID, int rating, int mID, string feedback, int lecturerID, DateTime dt) { using (FeedbackDataDataContext fbd = new FeedbackDataDataContext()) { var feedb = new feedback(); feedb.studentID = stuID; feedb.lectureRating = rating; feedb.moduleID = mID; feedb.Feedback1 = feedback; feedb.teacherID = lecturerID; feedb.date = dt; fbd.feedbacks.InsertOnSubmit(feedb); fbd.SubmitChanges(); } }
public List<string> getLecturers() { FeedbackDataDataContext te = new FeedbackDataDataContext(); var tlist = from teacher in te.Lecturers orderby teacher.teacherID select teacher.teacherName; return tlist.Take(tlist.Count()).ToList(); }
public List<string> getModuleList() { FeedbackDataDataContext te = new FeedbackDataDataContext(); var mlist = from modul in te.modules orderby modul.moduleName descending select modul.moduleName; return mlist.Take(mlist.Count()).ToList(); }