public CountInfo PrepareToUpdate(SecurityInfo securityInfo, DateTimeOffset lastUpdateBrands, DateTimeOffset lastUpdateCatalogs, DateTimeOffset lastUpdateDirectories, DateTimeOffset lastUpdateProductDirections, DateTimeOffset lastUpdatePhotos, bool needLoadPhotos, long[] ids) { CountInfo result = null; if (ValidatePassword(securityInfo)) { IShapingBrands shapingBrands = new ShapingBrands(dataService, optionService); IShapingCatalogs shapingCatalogs = new ShapingCatalogs(dataService, optionService, priceService); IShapingDirectories shapingDirectories = new ShapingDirectories(dataService, optionService); IShapingProductDirections shapingProductDirections = new ShapingProductDirections(dataService, optionService); IShapingPhotos shapingPhotos = new ShapingPhotos(dataService, optionService); result = new CountInfo { CountBrands = shapingBrands.PrepareToUpdate(securityInfo.Login, lastUpdateBrands), CountCatalogs = shapingCatalogs.PrepareToUpdate(securityInfo.Login, lastUpdateCatalogs), CountDirectories = shapingDirectories.PrepareToUpdate(securityInfo.Login, lastUpdateDirectories), CountProductDirections = shapingProductDirections.PrepareToUpdate(securityInfo.Login, lastUpdateProductDirections), CountPhotos = needLoadPhotos ? shapingPhotos.PrepareToUpdate(securityInfo.Login, lastUpdatePhotos, ids) : 0, IsAuthorized = true }; } return(result); }
public void ConfirmUpdateDirectories(SecurityInfo securityInfo, List <long> itemIds) { if (ValidatePassword(securityInfo)) { IShapingDirectories shaping = new ShapingDirectories(dataService, optionService); shaping.ConfirmUpdate(securityInfo.Login, itemIds); } }
public Directories GetDirectories(SecurityInfo securityInfo, DateTimeOffset lastUpdate) { Directories directories = null; if (ValidatePassword(securityInfo)) { IShapingDirectories shaping = new ShapingDirectories(dataService, optionService); directories = shaping.GetItems(securityInfo.Login, lastUpdate); } return(directories); }
public DirectoryInfo GetDirectory(SecurityInfo securityInfo, long id) { DirectoryInfo directory = null; if (ValidatePassword(securityInfo)) { IShapingDirectories shaping = new ShapingDirectories(dataService, optionService); directory = shaping.GetItem(id); } return(directory); }