Exemplo n.º 1
0
        // 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));
        }
Exemplo n.º 2
0
        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));
        }