public bool updateGeospatialData(GeospatialData geospatialData)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.GeospatialData.Update(geospatialData);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
 public bool deleteArea(Area area)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Remove(area);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
 public bool updateLocus(Locus locus)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Locus.Update(locus);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
示例#4
0
 public bool updateSquare(Square square)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Square.Update(square);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
示例#5
0
 public bool updateSupervisor(Supervisor supervisor)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Supervisor.Update(supervisor);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
示例#6
0
 public bool deleteObject(Models.Object obj)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Remove(obj);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
示例#7
0
 public bool updateTeam(Team team)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Team.Update(team);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
 public bool createSite(Site site)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Site.Add(site);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }
 public bool deletePotteryBucket(PotteryBucket potteryBucket)
 {
     try {
         using (var context = new ArchaeologyContext()) {
             context.Remove(potteryBucket);
             context.SaveChanges();
         }
     }
     catch (Exception ex) {
         throw new Exception(ex.Message, ex.InnerException);
     }
     return(true);
 }