Esempio n. 1
0
        private void ResetForCompany(long companyId)
        {
            List <long> lstDeleteProduct  = new List <long>();
            var         lstCacheDuplicate = _cacheCheckDuplicateProduct.GetAllDuplicateOfCompany(companyId);
            var         lstProductIds     = _productAdapter.GetAllProductIDsByCompany(companyId);

            foreach (var productDuplicate in lstCacheDuplicate)
            {
                if (!lstProductIds.Contains(productDuplicate.IdDup))
                {
                    lstDeleteProduct.Add(productDuplicate.Id);
                }
            }
            _cacheCheckDuplicateProduct.DeleteProductDuplicated(companyId, lstDeleteProduct);

            _log.Info(string.Format("Reset for company {0} number product {1} number duplicate item {2} deleted product duplicate {3}", companyId, lstCacheDuplicate.Count, lstProductIds.Count,
                                    lstDeleteProduct.Count));
        }
Esempio n. 2
0
 internal void LoadByCompany(long company)
 {
     this.gridControl1.DataSource = _cacheDuplicateProduct.GetAllDuplicateOfCompany(company);
 }