Exemplo n.º 1
0
 private void LoadPricatBrandMapping()
 {
     PricatBrandMapping = PricatBrands.ToDictionary(
         pricatBrand => pricatBrand.Alias,
         pricatBrand => pricatBrand.Name,
         StringComparer.CurrentCultureIgnoreCase);
 }
Exemplo n.º 2
0
        private void LoadPricatBrandCodes()
        {
            BrandCodes = PricatBrands.ToLookup(pricatBrand => pricatBrand.Name, pricatBrand => pricatBrand.Code, StringComparer.OrdinalIgnoreCase);

            foreach (var brandName in BrandCodes.Where(group => group.Count() > 1).Select(group => group.Key))
            {
                TraceWarning("The brand '{0}' has multiple brand codes.", brandName);
            }
        }
Exemplo n.º 3
0
 private DataTable GetPricatBrands()
 {
     return(PricatBrands
            .Select(item => new
     {
         item.Code,
         Name = item.Name.ToLower().ToTitle()
     })
            .ToDataTable());
 }