Exemple #1
0
        // GET: Commande
        public async Task <ActionResult> Index()
        {
            var StockCtrl = new StockConsumeController();

            StockCtrl.ControllerContext = new ControllerContext(this.ControllerContext.RequestContext, StockCtrl);

            return(View(await StockCtrl.getStockList()));
        }
Exemple #2
0
        public ActionResult ChangeStatusToShipped(int id)
        {
            commande cmd = gCommandes.FindById(id);

            cmd.status  = 1;
            cmd.shipped = DateTime.Now;
            StockConsumeController stCtrl = new StockConsumeController();

            stCtrl.UpdateStock(cmd);//call method post of rest api to update stock
            gCommandes.Update(cmd);
            gCommandes.Commit();
            return(RedirectToAction("List"));
        }