Пример #1
0
 private void InitializeDefaultSetting()
 {
     _projectDBService               = new SCA.DatabaseAccess.DBContext.ProjectDBService(_dbFileVersionService);
     _controllerDBService            = new SCA.DatabaseAccess.DBContext.ControllerDBService(_dbFileVersionService);
     _loopDBService                  = new SCA.DatabaseAccess.DBContext.LoopDBService(_dbFileVersionService);
     _linkageConfigStandardDBService = new SCA.DatabaseAccess.DBContext.LinkageConfigStandardDBService(_dbFileVersionService);
     _linkageConfigGeneralDBService  = new SCA.DatabaseAccess.DBContext.LinkageConfigGeneralDBService(_dbFileVersionService);
     _linkageConfigMixedDBService    = new SCA.DatabaseAccess.DBContext.LinkageConfigMixedDBService(_dbFileVersionService);
     _manualControlBoardDBService    = new SCA.DatabaseAccess.DBContext.ManualControlBoardDBService(_dbFileVersionService);
     _deviceTypeDBService            = new SCA.DatabaseAccess.DBContext.DeviceTypeDBService(_dbFileVersionService);
     _connection = new SerialConnection();
 }
Пример #2
0
        private void InitializeDefaultSetting()
        {
            _fileService = new SCA.BusinessLib.Utility.FileService();
            ILogRecorder logger = null;

            _projectDBService               = new SCA.DatabaseAccess.DBContext.ProjectDBService(_databaseService);
            _controllerDBService            = new SCA.DatabaseAccess.DBContext.ControllerDBService(_databaseService);
            _loopDBService                  = new SCA.DatabaseAccess.DBContext.LoopDBService(_databaseService);
            _linkageConfigStandardDBService = new SCA.DatabaseAccess.DBContext.LinkageConfigStandardDBService(_databaseService);
            _linkageConfigGeneralDBService  = new SCA.DatabaseAccess.DBContext.LinkageConfigGeneralDBService(_databaseService);
            _linkageConfigMixedDBService    = new SCA.DatabaseAccess.DBContext.LinkageConfigMixedDBService(_databaseService);
            _manualControlBoardDBService    = new SCA.DatabaseAccess.DBContext.ManualControlBoardDBService(_databaseService);
            _deviceTypeDBService            = new SCA.DatabaseAccess.DBContext.DeviceTypeDBService(_databaseService);
        }
Пример #3
0
        //未测试
        public bool SaveLoops(List <Model.LoopModel> lstLoopModel, ILoopDBService loopDBService, IDeviceDBService <DeviceInfo8036> deviceDBService)
        {
            try
            {
                //INSERT INTO "DeviceInfo8036" ("ID", "Code", "Disabled", "LinkageGroup1", "LinkageGroup2", "AlertValue", "ForcastValue", "DelayValue", "BuildingNo", "ZoneNo", "FloorNo", "RoomNo", "Location", "LoopID", "TypeID", "ROWID") VALUES (4, '00101004', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 9, 4);
                //创建器件
                loopDBService.AddLoopInfo(lstLoopModel);

                deviceDBService.CreateTableStructure();

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }