Exemplo n.º 1
0
        public string Update(int itemId, int quantity)
        {
            int availablequantity = stockInGateway.GetStockInById(itemId);

            availablequantity -= quantity;
            StockIn stockIn = new StockIn();

            stockIn.ItemId            = itemId;
            stockIn.AvailableQuantity = availablequantity;

            int rowAffect = stockInGateway.Update(stockIn);

            if (rowAffect > 0)
            {
                return("Update Successful");
            }
            else
            {
                return("Update Failed");
            }
        }