public bool CreateLicenseSnapshot(int licenseId, DataHarmonizationQueue queueItem)
        {
            _dataHarmonizationQueueService.MarkAsInProcess(queueItem);

            try
            {
                //get local license, save local license as licenseSnapshot
                var localLicense = _licenseRepository.GetLicenseById(licenseId);

                //get licenseProducts from 'GetProductsNew'
                var licenseProducts = _licenseProductService.GetProductsNew(localLicense.LicenseId);

                var test     = licenseProducts[0].ProductHeader.Label;
                var testPass = test;
                //save localLicense Snapshot and licenseProducts as snapshot
                _snapshotManager.TakeLicenseSnapshot(localLicense, licenseProducts);
            }
            catch (Exception e)
            {
                _dataHarmonizationQueueService.MarkAsError(queueItem);
                _logManager.LogErrors(e);
                throw new Exception("Error Creating License Snapshot.  Error: " + e.ToString());
            }
            finally
            {
                _dataHarmonizationQueueService.CreateMarkAsComplete(queueItem);
            }

            return(true);
        }
Esempio n. 2
0
 private void EditQueueItem(DataHarmonizationQueue item)
 {
     try
     {
         _dataHarmonizationQueueRepository.EditDataHarmonizationQueue(item);
     }
     catch (Exception e)
     {
         _logManager.LogErrors(e);
         throw new Exception("Error Updating DataHarmonizationQueue Item");
     }
 }