Пример #1
0
        public MainViewModel()
        {
            this._Logger          = ServiceLocator.Current.GetInstance <ILog>();
            this._resourceManager = ServiceLocator.Current.GetInstance <IResourceManager>();
            this._resourceManager.InitialiseResources(false);
            this._Settings = (Settings)this._resourceManager.GetResourcePayload(ResourceName.Mapping_Settings);
            if (this._Settings == null)
            {
                this._Settings = new Settings();
            }
            else
            {
                this._LocalImportPath = this._Settings.ListOfSettings.Where(i => i.Name == "Import_Folder").Select(i => i.Data).FirstOrDefault();
                this.RemoteImportPath = this._Settings.ListOfSettings.Where(i => i.Name == "Remote_Import_Folder").Select(i => i.Data).FirstOrDefault();
                this.ExportPath       = this._Settings.ListOfSettings.Where(i => i.Name == "Export_Folder").Select(i => i.Data).FirstOrDefault();
            }

            this.isPrecheckEnabled = true;
            this.isAllChecked      = false;
            this.isReadCloud       = true;
            this._DBActions        = ServiceLocator.Current.GetInstance <IDBActions>();

            this.isFlushDB = true;
            this.isImport  = true;

            this._Importer = ServiceLocator.Current.GetInstance <IImport>();
            this._Exporter = ServiceLocator.Current.GetInstance <IExport>();

            if (this._RemoteImportPath != null)
            {
                this.PreChecks();
            }
        }
Пример #2
0
 public SearchWorkplaces()
 {
     workplaceDB          = new WorkplaceRepository();
     buildingDB           = new BuildingRepository();
     workplaceEquipmentDB = new WorkplaceEquipmentRepository();
     equipmentDB          = new EquipmentRepository();
 }
Пример #3
0
 public SearchWorkplaces(int clientId)
 {
     _workplaceParameterDB = new WorkplaceParameterRepository();
     _searchSettingDB      = new SearchSettingRepository();
     _buildingDB           = new BuildingRepository();
     _workplaceDB          = new WorkplaceRepository();
     _workplaceEquipmentDB = new WorkplaceEquipmentRepository();
     _workplaceParameters  = _workplaceParameterDB.GetEntityListByClientId(clientId);
     _idealMark            = GetIdealMark();
     _searchSetting        = _searchSettingDB.GetEntity(clientId);
 }
Пример #4
0
 public SearchWorkplaces(double latitude, double longitude, int clientId)
 {
     _workplaceParameterDB = new WorkplaceParameterRepository();
     _searchSettingDB      = new SearchSettingRepository();
     _buildingDB           = new BuildingRepository();
     _workplaceDB          = new WorkplaceRepository();
     _workplaceEquipmentDB = new WorkplaceEquipmentRepository();
     _latitude             = latitude;
     _longitude            = longitude;
     _workplaceParameters  = _workplaceParameterDB.GetEntityListByClientId(clientId);
     _idealMark            = GetIdealMark();
     _searchSetting        = _searchSettingDB.GetEntity(clientId);
     _buildingsInRadius    = GetBuildingsInRadius();
 }
Пример #5
0
 public SearchSettingController(ClientRepository clientRepository)
 {
     SearchSettingDB = new SearchSettingRepository();
     clientDB        = clientRepository;
 }
Пример #6
0
 public EquipmentController()
 {
     EquipmentDB = new EquipmentRepository();
 }
Пример #7
0
 public WorkplaceStatistics()
 {
     workplaceOrderDB = new WorkplaceOrderRepository();
     workplaceDB      = new WorkplaceRepository();
 }
Пример #8
0
 public OrderWorkplace(ClientRepository clientRepository)
 {
     clientDB         = clientRepository;
     workplaceDB      = new WorkplaceRepository();
     workplaceOrderDB = new WorkplaceOrderRepository();
 }
Пример #9
0
 public WorkplaceOrderController(ClientRepository clientRepository)
 {
     WorkplaceOrderDB = new WorkplaceOrderRepository();
     OrderWorkplace   = new OrderWorkplace(clientRepository);
 }
Пример #10
0
 public BuildingController()
 {
     BuildingDB = new BuildingRepository();
 }
Пример #11
0
 public WorkplaceController()
 {
     WorkplaceDB = new WorkplaceRepository();
 }
Пример #12
0
 public LandlordController()
 {
     LandlordDB = new LandlordRepository();
 }
Пример #13
0
 public WorkplaceParameterController(ClientRepository clientRepository)
 {
     WorkplaceParameterDB = new WorkplaceParameterRepository();
     clientDB             = clientRepository;
 }
Пример #14
0
 public WorkplaceEquipmentController()
 {
     WorkplaceEquipmentDB = new WorkplaceEquipmentRepository();
 }