Exemplo n.º 1
0
        public BAM_HardwareAssetServices(BAM_ApiClient bamclient)
        {
            _bamclient = bamclient;
            if (_bamclient == null)
            {
                _bamclient = new BAM_ApiClient();
                Task.Run(() => _bamclient.Setup()).Wait();
            }
            _assetStatusService = new BAM_AssetStatusService(_bamclient);
            _userService        = new BAM_UserService(_bamclient);
            _costCenterService  = new BAM_CostCenterService(_bamclient);

            var jsonNameRelationships = JSON_FileExport.ReadFile("NameRelationships.json", "JsonStatics");

            _bamApiRelationships = JsonConvert.DeserializeObject <List <NameRelationship> >(jsonNameRelationships);
        }
Exemplo n.º 2
0
        public BAM_Service(IEST_Service estService, IBAM_HardwareAssetServices bAM_HardwareAsset, IBAM_AssetStatusService assetStatusService, IBAM_UserService userService, IReportingService reportingService)
        {
            bam_ApiClient = new BAM_ApiClient();
            Task.Run(() => bam_ApiClient.Setup()).Wait();
            //if (!Debugger.IsAttached)
            //    Debugger.Launch();
            //else
            //    Debugger.Break();

            _estService             = estService ?? new EST_Service();
            _hardwareAssetService   = bAM_HardwareAsset ?? new BAM_HardwareAssetServices(bam_ApiClient);
            _reportingService       = reportingService ?? new ReportingService();
            _reportings             = new List <BAM_ReportingBsm>();
            _billables              = new List <BAM_ReportingBsm>();
            _progressReport         = new ServiceProgressReportBsm();
            _BAM_ModelLookupService = new EST_BAM_ModelLookupService();
        }