Beispiel #1
0
        public ActionResult EditIncome(int id)
        {
            var incomeRepository = new IncomeRepository();
            var incomeItem       = incomeRepository.FindIncome(id);
            var viewModel        = new IncomeManagingViewModel(incomeItem);

            return(View(viewModel));
        }
Beispiel #2
0
 public ActionResult AddNewIncome(IncomeManagingViewModel item)
 {
     if (ModelState.IsValid)
     {
         var incomeRepository = new IncomeRepository();
         incomeRepository.AddIncome(item.IncomeItem);
     }
     return(RedirectToAction("Index"));
 }