示例#1
0
 public bool Update(ScholarshipSiteLocation obj)
 {
     try
     {
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(false);
     }
     return(true);
 }
示例#2
0
 public int Add(ScholarshipSiteLocation obj)
 {
     try
     {
         _db.ScholarshipSiteLocations.InsertOnSubmit(obj);
         _db.SubmitChanges();
     }
     catch (Exception ex)
     {
         Debug.Print(ex.Message);
         return(-1);
     }
     return(_db.ScholarshipSiteLocations.Max(x => x.ScholarshipSiteLocationId));
 }