Exemple #1
0
        public async Task AfterUnregistered(IEnumerable <Guid> idsToUpdate, Guid identityWorkId, params object[] parameters)
        {
            LicenseParams licenseParams = parameters[0] as LicenseParams;
            var           service       = new LicensingService(LicensingServiceProviderFactory.GetProvider());

            service.AumentEmployeeLicense(licenseParams.LicenseID, licenseParams.LicenseServiceID);
            //Vacío (corte)
        }
Exemple #2
0
        public async Task AfterDeleteAsync(List <Guid> lstObjectsToValidate, IParams parameters)
        {
            LicenseParams licenseParams = parameters as LicenseParams;

            var service = new LicensingService(LicensingServiceProviderFactory.GetProvider());

            service.AumentEmployeeLicense(licenseParams.LicenseID, licenseParams.LicenseServiceID);
        }
Exemple #3
0
        public async Task AfterCreate(List <Employee> lstObjectsToValidate, IParams parameters)
        {
            var overdraftManager = new OverdraftManager();

            overdraftManager.CreateByEmployeesAsync(lstObjectsToValidate).Wait();
            LicenseParams licenseParams = parameters as LicenseParams;

            //Calculation async fire and forget
            IEnumerable <Guid> employeeIds = lstObjectsToValidate.Select(p => p.ID);
            var company    = lstObjectsToValidate.FirstOrDefault().company;
            var instanceID = lstObjectsToValidate.FirstOrDefault().InstanceID;
            var userId     = lstObjectsToValidate.FirstOrDefault().IdentityID;

            new OverdraftCalculationManager().CalculationFireAndForgetByEmployeesAsync(employeeIds, company, instanceID, userId);
            //Updatefeature
            var service = new LicensingService(LicensingServiceProviderFactory.GetProvider());
            await service.ConsumeEmployeeLicense(licenseParams.LicenseID, licenseParams.LicenseServiceID);
        }
Exemple #4
0
 public async Task DeleteAsync(List <Guid> lstGuids, LicenseParams licenseParams)
 {
     var middlewareManager = new MiddlewareManager <T>(new BaseRecordManager <T>(), Validator);
     await middlewareManager.DeleteAsync(lstGuids, licenseParams);
 }
Exemple #5
0
 public async Task CreateAsync(List <T> lstObjects, LicenseParams licenseParams)
 {
     var middlewareManager = new MiddlewareManager <T>(new BaseRecordManager <T>(), Validator);
     await middlewareManager.CreateAsync(lstObjects, licenseParams);
 }
Exemple #6
0
 public Task CreateAsync(List <T> lstObjects, LicenseParams licenseParams)
 {
     return(_client.CreateAsync(lstObjects, licenseParams));
 }
Exemple #7
0
 public Task DeleteAsync(List <Guid> lstGuids, LicenseParams licenseParams)
 {
     return(_client.DeleteAsync(lstGuids, licenseParams));
 }