// // GET: /order/Details/5 public ActionResult Details(int id)//id cua website order { var Order = StoreDb.WebsiteOrders.Single(o=>o.Id == id); var BuyCustomer = StoreDb.BuyCustomers.Single(b=>b.BuyingId == Order.BuyingId); OrderDetailsViewModel model = new OrderDetailsViewModel() { BuyCustomer = BuyCustomer, Order = Order }; TransactionLogViewModel.AddLog(User.Identity.Name+" has just viewed the details of OrderId: "+BuyCustomer.BuyingId , DateTime.Now); return View(model); }
public ActionResult vieworder() { string Userlogin = User.Identity.Name; var Order = db.WebsiteOrders.Single(o => o.BuyingId == Userlogin); var BuyCustomer = db.BuyCustomers.Single(b => b.BuyingId == Order.BuyingId); OrderDetailsViewModel model = new OrderDetailsViewModel() { BuyCustomer = BuyCustomer, Order = Order }; TransactionLogViewModel.AddLog("Customer: " + Userlogin + " has just viewed the Order Detail of OrderID: "+Userlogin, DateTime.Now); return View(model); }
public ActionResult endtranDetails(int id) { //lay thong tin cua 1 order var Order = StoreDb.WebsiteOrders.Single(o => o.Id == id); //lay thong tin Customer BUy cua order do var BuyCustomer = StoreDb.BuyCustomers.Single(b => b.BuyingId == Order.BuyingId); OrderDetailsViewModel model = new OrderDetailsViewModel() { BuyCustomer = BuyCustomer, Order = Order }; return View(model); }