コード例 #1
0
ファイル: LoadService.cs プロジェクト: avlhitech256/Price
        private void Update(CatalogItemEntity entity, CatalogInfo catalogInfo)
        {
            BrandItemEntity        brandItem = GetBrandWithLoad(catalogInfo.BrandId);
            DirectoryEntity        directory = GetDirectoryWithLoad(catalogInfo.DirectoryId);
            List <PhotoItemEntity> photos    = GetPhotosWithLoad(catalogInfo.Photos);

            entity.Id                 = catalogInfo.Id;
            entity.UID                = catalogInfo.UID;
            entity.Code               = catalogInfo.Code;
            entity.Article            = catalogInfo.Article;
            entity.Brand              = brandItem;
            entity.BrandName          = brandItem?.Name;
            entity.Name               = catalogInfo.Name;
            entity.Unit               = catalogInfo.Unit;
            entity.EnterpriceNormPack = catalogInfo.EnterpriceNormPack;
            entity.BatchOfSales       = catalogInfo.BatchOfSales;
            entity.Balance            = catalogInfo.Balance;
            entity.Price              = catalogInfo.Price;
            entity.Currency           = catalogInfo.Currency;
            entity.Multiplicity       = catalogInfo.Multiplicity;
            entity.HasPhotos          = catalogInfo.HasPhotos;
            entity.Photos             = photos;
            entity.DateOfCreation     = catalogInfo.DateOfCreation;
            entity.LastUpdated        = catalogInfo.LastUpdated;
            entity.ForceUpdated       = catalogInfo.ForceUpdated;
            entity.Status             = LoadAssembler.Convert(catalogInfo.Status);
            entity.LastUpdatedStatus  = catalogInfo.LastUpdatedStatus;
            entity.Directory          = directory;
        }
コード例 #2
0
ファイル: LoadService.cs プロジェクト: avlhitech256/Price
        private BrandItemEntity Create(BrandInfo brandInfo, List <BrandItemEntity> entitiesToInsert = null)
        {
            BrandItemEntity brand = LoadAssembler.Assemble(brandInfo);

            brandRepository.Add(brand);
            entitiesToInsert?.Add(brand);
            return(brand);
        }
コード例 #3
0
ファイル: LoadService.cs プロジェクト: avlhitech256/Price
        private CatalogItemEntity Create(CatalogInfo catalogInfo)
        {
            BrandItemEntity        brandItem = GetBrandWithLoad(catalogInfo.BrandId);
            DirectoryEntity        directory = GetDirectoryWithLoad(catalogInfo.DirectoryId);
            List <PhotoItemEntity> photos    = GetPhotosWithLoad(catalogInfo.Photos);
            CatalogItemEntity      entity    = LoadAssembler.Assemble(catalogInfo, brandItem, photos, directory);

            return(entity);
        }
コード例 #4
0
ファイル: LoadService.cs プロジェクト: avlhitech256/Price
        private DirectoryEntity Create(DirectoryInfo directoryInfo,
                                       List <DirectoryInfo> cacheDirectoryInfos,
                                       List <DirectoryEntity> cacheDirectoryEntities,
                                       List <DirectoryEntity> entitiesToInsert)
        {
            DirectoryEntity directory = null;

            if (directoryInfo != null)
            {
                directory = LoadAssembler.Assemble(directoryInfo, null, new List <DirectoryEntity>());
                directoryRepository.Add(directory);
                entitiesToInsert.Add(directory);
                cacheDirectoryEntities.Add(directory);
                directory.Parent = GetDirectoryWithLoad(directoryInfo.Parent,
                                                        cacheDirectoryInfos,
                                                        cacheDirectoryEntities,
                                                        entitiesToInsert);
            }

            return(directory);
        }
コード例 #5
0
ファイル: LoadService.cs プロジェクト: avlhitech256/Price
        private PhotoItemEntity Create(PhotoInfo photoInfo)
        {
            PhotoItemEntity entity = LoadAssembler.Assemble(photoInfo);

            return(entity);
        }