// 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)); }
public void GetLocationItems() { Product P = new Product(); Console.WriteLine("Enter Location Name"); currentLocation = SearchForLocation(Console.ReadLine()); foreach (var item in _storeBL.GetLocationItems()) { if (item.LFK == currentLocation.Id) { //Console.WriteLine(item.ToString()); P = _storeBL.GetProductById((int)item.PFK); Console.WriteLine(P.ToString()); Console.WriteLine($"\tQuantity available {item.Quantity}\n"); } } Console.WriteLine("Press any key to continue"); Console.ReadLine(); }