// GET: Management public ActionResult index(int?page) { List <ManagementVO> objManagementList = _ManagementBizManager.GetAllManagement(null); var pager = new Pager(objManagementList.Count(), page); var viewModel = new ManagementList { Management = objManagementList.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize).ToList(), Pager = pager }; ViewBag.ManagementDll = new ManagementVO().ManagementCategory.ToSelectList <ManagementCategoryEnum>(); return(View("../Admin/Management/Index", viewModel)); }
// GET: Dashboard public ActionResult Index() { List <ManagementVO> ManagementList = _ManagementBizManager.GetAllManagement(null); ViewBag.Investment = ManagementList.Where(x => x.ManagementCategoryId == (int)ManagementCategoryEnum.Investment).Sum(x => x.RupeeOrMinute); ViewBag.Income = ManagementList.Where(x => x.ManagementCategoryId == (int)ManagementCategoryEnum.Income).Sum(x => x.RupeeOrMinute); ViewBag.TimeSpent = (ManagementList.Where(x => x.ManagementCategoryId == (int)ManagementCategoryEnum.TimeSpent).Sum(x => x.RupeeOrMinute) / (60 * 1.0)).ToString("#.##");; return(View("../admin/dashboard/index")); }