private void UpdateStagedItems(StagedItemDTO item) { _stagedItemDal.Update(DTOtoEntityMapper(item)); }
public int UpdateFromStagedItem(StagedItemDTO staged) { var matchingEntity = _itemDal.Get(staged.UPC); matchingEntity.StockCount = staged.StockCount; matchingEntity.ItemPrice = staged.ItemPrice; return _itemDal.Update(matchingEntity); }
private bool StagedItemAlreadyExists(StagedItemDTO item) { try { return (_stagedItemDal.Get(item.UPC) != null); } catch (Exception) { return false; } }
private bool ItemAlreadyExits(StagedItemDTO item) { return (_itemBll.GetItemByUPC(item.UPC) != null); }
private StagedItem DTOtoEntityMapper(StagedItemDTO stagedItemDTO) { return new StagedItem { ItemPrice = stagedItemDTO.ItemPrice, Name = CleanName(stagedItemDTO.Name), UPC = stagedItemDTO.UPC, StockCount = stagedItemDTO.StockCount }; }
private void CreateStagedItems(StagedItemDTO stagedItemDTO) { _stagedItemDal.Create(DTOtoEntityMapper(stagedItemDTO)); }
private StagedItem ConvertDTOToEntity(StagedItemDTO dto) { return new StagedItem { ID = dto.ID, ItemPrice = dto.ItemPrice, Name = dto.Name, StockCount = dto.StockCount, UPC = dto.UPC }; }