Exemplo n.º 1
0
        public ActionResult ShowMoneyList(int?page)
        {
            var pageIndex = page ?? 1;

            ShowMoneyListViewModel MoneyList = new ShowMoneyListViewModel();

            MoneyList.MyMoney = _moneyService.DisplayPagedData(pageIndex, pageSize);

            return(PartialView("_ShowMoneyList", MoneyList));
        }
Exemplo n.º 2
0
        public ActionResult Create()
        {
            ViewBag.Category = _moneyService.GetCategoryItems();

            ShowMoneyListViewModel MoneyList = new ShowMoneyListViewModel();

            MoneyList.MyMoney     = _moneyService.DisplayPagedData(1, pageSize);
            ViewData["MoneyData"] = MoneyList;

            return(View());
        }
Exemplo n.º 3
0
        public ActionResult Create(MoneyCreateViewModel NewMoney)
        {
            if (ModelState.IsValid)
            {
                NewMoney.Id = Guid.NewGuid();
                _moneyService.Create(NewMoney);
                _moneyService.Save();
            }

            ViewBag.Category = _moneyService.GetCategoryItems();

            ShowMoneyListViewModel MoneyList = new ShowMoneyListViewModel();

            MoneyList.MyMoney     = _moneyService.DisplayPagedData(1, pageSize);
            ViewData["MoneyData"] = MoneyList;

            return(View());
        }