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);
            }
        }
示例#5
0
 partial void Deleteexam(exam instance);
示例#6
0
 partial void Updateexam(exam instance);
示例#7
0
 partial void Insertexam(exam instance);