public exam SearchExam(int eid) { try { exam e1 = dc.exams.Single(ee1 => ee1.examid == eid); return(e1); } catch (Exception e) { return(null); } }
public string DeleteExam(int eid) { try { exam e1 = dc.exams.Single(ee1 => ee1.examid == eid); dc.SubmitChanges(); return("Delete"); } catch (Exception e) { return(e.Message); } }
public string InsertExam(exam ee) { try { dc.exams.InsertOnSubmit(ee); dc.SubmitChanges(); return("Inserted"); } catch (Exception e) { return(e.Message); } }
public string UpdateExam(exam ee) { try { exam e1 = dc.exams.Single(ee1 => ee1.examid == ee.examid); e1.rno = ee.rno; e1.sem = ee.sem; e1.examid = ee.examid; e1.per = ee.per; dc.SubmitChanges(); return("Updated"); } catch (Exception e) { return(e.Message); } }
partial void Deleteexam(exam instance);
partial void Updateexam(exam instance);
partial void Insertexam(exam instance);