Пример #1
0
 public TunnelDGObjectLoader(DbContext dbContext)
 {
     _dbLoader = new TunnelDbDataLoader(dbContext);
 }
 public DGObjectLoader(DbContext dbContext)
 {
     _dbLoader = new DbDataLoader(dbContext);
 }
Пример #3
0
        // Summary:
        //     Load all objects from database
        public bool loadAllObjects(DbContext dbContext)
        {
            if (parent == null)
                return false;

            bool success = true;

            foreach (DGObjectsDefinition def in objsDefinitions.Values)
            {
                bool loaded = loadObjects(def.Name, dbContext);
                if (!loaded)
                    success = false;
            }

            return success;
        }
Пример #4
0
        // Summary:
        //     Load objects from database
        public bool loadObjects(string objDefName, DbContext dbContext)
        {
            if (parent == null)
                return false;

            DGObjectsDefinition def = objsDefinitions[objDefName];
            if (def == null)
                return false;

            DGObjects objs = new DGObjects(def);
            bool success = objs.load(dbContext);
            objs.parent = this;

            // Old objs will be replaced recently loaded objects.
            if (success)
                objsContainer[def.Name] = objs;

            return success;
        }
Пример #5
0
 public GeologyDGObjectLoader(DbContext dbContext)
 {
     _dbLoader = new GeologyDbDataLoader(dbContext);
 }
Пример #6
0
 public MonitoringDGObjectLoader(DbContext dbContext)
 {
     _dbLoader = new MonitoringDbDataLoader(dbContext);
 }