Ejemplo n.º 1
0
        public virtual ActionResult BulkAddProduct(List <BasketAddModel> model)
        {
            if (model.Any(prod => string.IsNullOrEmpty(prod.StockCode)))
            {
                return(JsonError("false", JsonRequestBehavior.DenyGet));
            }

            model.ForEach(prod => prod.StockCode = prod.StockCode.ToUpper());

            var basket = _basketApi.BulkAddProduct(model);

            return(JsonSuccess(basket, JsonRequestBehavior.AllowGet));
        }