// GET: Admin public ActionResult Index() { ViewBag.UpperMessage = "CSV Upload"; var model = new AdminIndexPageViewModel(db); model.Transactions = db.Transactions.Include(t => t.Buyer).Include(t => t.SalesPerson).Include(t => t.Seller).Include(t => t.Items).ToList(); return(View(model)); }
public ActionResult Index(AdminIndexPageViewModel data) { if (data.File != null) { ViewBag.Message = ReadFile(data.File); } var model = new AdminIndexPageViewModel(db); model.Transactions = db.Transactions.Include(t => t.Buyer).Include(t => t.SalesPerson).Include(t => t.Seller).Include(t => t.Items).ToList(); return(View(model)); }