예제 #1
0
        public async Task EditQuantityinItems(EditItemDto dto)
        {
            var SortedItem = await GetListSortedWithPrice(dto.subcategoryId);

            for (int i = 0; i < SortedItem.Count; i++)
            {
                SortedItem[i].Qty = dto.qtysArr[i];
            }
        }
예제 #2
0
        public async Task EditItem(EditItemDto input)
        {
            var item = await _dbContext.Items.SingleOrDefaultAsync(i => i.Id == input.Id);

            if (item == null)
            {
                return;
            }

            item.Title       = input.Title;
            item.Description = input.Description;

            await _dbContext.SaveChangesAsync();
        }
예제 #3
0
 public IActionResult EditQuantity(EditItemDto dto)
 {
     _unitOfWork.Items.EditQuantityinItems(dto);
     _unitOfWork.Complete();
     return(Ok());
 }