Exemplo n.º 1
0
        public async Task <IActionResult> Finish(OrderModel model)
        {
            LoadData();
            try
            {
                await _appOrder.Finish(model);

                TempData["Success"] = true;
                TempData["Message"] = "Ordem Finalizada";
                return(RedirectToAction("Index"));
            }
            catch (Exception x)
            {
                ViewBag.Success = false;
                ViewBag.Message = x.Message;
                return(View(model));
            }
        }