Example #1
0
 public void DeleteTank(Tank tank)
 {
     try {
     TankRepository.Delete(tank);
     TankRepository.DbContext.CommitChanges();
       }
       catch (Exception e) {
     log.Error("Cound not delete tank. A dive probably references this tank");
     throw e;
       }
       return;
 }
Example #2
0
        public virtual bool Equals(Tank obj)
        {
            if (obj == null) return false;

              if (Equals(Volume, obj.Volume) == false)
            return false;

              if (Equals(WorkingPressure, obj.WorkingPressure) == false)
            return false;

              return true;
        }
Example #3
0
 public void Save(Tank tank)
 {
     try
       {
     TankRepository.SaveOrUpdate(tank);
     TankRepository.DbContext.CommitChanges();
       }
       catch (Exception e)
       {
     log.Error(("Unable to save tank"));
       }
 }