public void GetOrder()
        {
            Item     OrderItem = new Item();
            Customer c         = new Customer();
            Location l         = new Location();

            foreach (var item in _storeBL.GetOrder())
            {
                if (item.CFK == currentCustomer.Id)
                {
                    Console.WriteLine((_storeBL.GetCustomerById((int)item.CFK).ToString()));
                    l = _storeBL.GetLocationById((int)item.LFK);
                    Console.WriteLine(l.ToString() + "\n");
                    OrderItem = _storeBL.GetItemByOID((int)item.Id);
                    // if(OrderItem.Id ==null || OrderItem.PFK==null)
                    // {
                    //     Console.WriteLine((_storeBL.GetProductById(OrderItem.PFK)).ToString());
                    //     Console.WriteLine($"Quantity {OrderItem.Quantity}");
                    // }

                    Console.WriteLine(item.ToString());
                    //_storeBL.GetOIS
                }
            }
            Console.WriteLine("Press any key to continue");
            Console.ReadLine();
        }
Exemple #2
0
 // GET: OrderController
 /// <summary>
 /// index to view all of the orders that have been placed with the system
 /// </summary>
 /// <returns></returns>
 public ActionResult Index()
 {
     return(View(_partsBL.GetOrder().Select(order => _mapper.cast2OrderIndexVM(order)).ToList()));
 }