public ActionResult DeleteOrder(int OrderId)
        {
            Order deletedOrd = processor.DeleteOrder(OrderId);

            if (deletedOrd != null)
            {
                TempData["message"] = string.Format("Заказ {0} був видалений", deletedOrd.OrderId);
            }
            return(RedirectToAction("Purchases"));
        }
Beispiel #2
0
        public ActionResult DeleteOrder(int orderid)
        {
            Order deletedOrder = _orderProcessor.DeleteOrder(orderid);

            if (deletedOrder != null)
            {
                TempData["successMessage"] = string.Format("{0} order was deleted",
                                                           deletedOrder.CustomerName);
            }
            return(RedirectToAction("Orders"));
        }