예제 #1
0
        // GET: OrderController/Details/5
        /// <summary>
        /// View the details of specific orders(lcoation,Customer,Total,producsts, quantity)
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(int id)
        {
            Order         o  = _partsBL.GetOrderById(id);
            OrderDetailVM od = new OrderDetailVM();

            od.CustomerName = _partsBL.GetCustomerById(o.CustomerId).CustomerName;
            od.LocationName = _partsBL.GetLocationById(o.LocationId).LocationName;
            od.ProductName  = _partsBL.GetProductById(o.ProductId).ProductName;
            od.Quanity      = o.Quantity;
            od.Total        = o.Total;
            return(View(od));
        }