Exemplo n.º 1
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var statuses = _statusLogic.GetAll().
                           Select(s => new SelectListItem
            {
                Text  = s.Name,
                Value = s.Id.ToString()
            }).ToList();

            ViewBag.Statuses = statuses;

            var items = _orderItemLogic.GetItemsOfOrder(id);

            ViewBag.CartInfo = items;

            var order = _orderLogic.Get(id);

            if (order == null)
            {
                return(HttpNotFound());
            }
            return(View(order));
        }
Exemplo n.º 2
0
 public ActionResult Index()
 {
     return(View(_statusLogic.GetAll()));
 }