public async Task <IActionResult> CurrencyBundleList() { CurrencyBundleListAndTotalViewModel model = new CurrencyBundleListAndTotalViewModel(); model.CurrencyBundleList = await _db.CurrencyBundleDb.ToListAsync(); model.TotalCash = 100; return(View(model)); }
public async Task <IActionResult> CurrencyBundleListPost() { CurrencyBundleListAndTotalViewModel model = new CurrencyBundleListAndTotalViewModel(); model.CurrencyBundleList = await _db.CurrencyBundleDb.ToListAsync(); string itemSelected = Request.Form["itemSelected"].ToString(); if (String.IsNullOrEmpty(itemSelected)) { return(NotFound()); } int id = Int32.Parse(itemSelected); return(RedirectToAction("BuyCurrencyBundle", "CurrencyBundle", new { id })); }