Beispiel #1
0
        public ActionResult addQuantity(int Quantity)
        {
            genericProduct genericProduct = new genericProduct();

            List <Product> productList = new List <Product>();

            int q = intQ + Quantity;

            genericProduct.UpdateQuantity(prodid, q);

            return(RedirectToAction("addSaleData", new { id = prodid, curntQ = curentQ }));
        }
Beispiel #2
0
        public ActionResult addSaleData(int Quantity)
        {
            genericProduct genericProduct = new genericProduct();

            List <Product> productList = new List <Product>();

            int q = curentQ - Quantity;

            genericProduct.UpdateQuantity(prodid, q);
            if (q < 5)
            {
                NotificationsDisplay notifications = new NotificationsDisplay();
                notifications.CreateAnotification("Only " + q + " products left for  " + productname, "Packeger");
            }
            return(RedirectToAction("addSaleData", new { id = prodid, curntQ = curentQ }));
        }