Exemplo n.º 1
0
        public ActionResult UpdateOrder(long OrderID)
        {
            ActionResult response;

            if ((string)Session["RoleName"] == "Admin")
            {
                //check id CANT be default or less than 0
                if (OrderID > 0)
                {
                    OrderDO orderDO = ordersDAO.ViewByOrderID(OrderID);
                    Order   orderPo = orderMapper.MapDoToPO(orderDO);

                    response = View(orderPo);
                }
                else
                {
                    response = RedirectToAction("Index", "Home");
                }
            }
            else
            {
                response = RedirectToAction("Index", "Home");
            }
            return(response);
        }