public ActionResult ShowChart() { AssetService assetService = new AssetService(); List <AssetSummary> result = assetService.CalcSummary(); return(View(result)); }
public ActionResult Index() { AssetService assetService = new AssetService(); List <AssetSummary> result = assetService.CalcSummary(); decimal totalAmountSGD = (from od in result select od.Amount).Sum(); ViewBag.TotalAmountSGD = totalAmountSGD; List <AssetHistory> assetHistories = db.AssetHistories.Take(10).OrderByDescending(d => d.RecordDate).ToList(); ViewBag.AssetHistories = assetHistories; return(View(result)); }