Esempio n. 1
0
 public ViewResult Index()
 {
     var indexModel = new BudgetIndexWebModel();
     try
     {
         indexModel.StoredBudgets = _budgetService.GetOverview();
         return View("Index", indexModel);
     }
     catch (Exception)
     {
         ViewData["Message"] = "Feil under henting av budsjetter.";
         indexModel.StoredBudgets = new List<Budget>();
         return View("Index", indexModel);
     }
 }
Esempio n. 2
0
 public ViewResult OpenReport(int year, string budgetStatus)
 {
     var indexModel = new BudgetIndexWebModel { StoredBudgets = _budgetService.GetOverview() };
     ViewData["Message"] = "Denne funksjonen er ikke implemmentert enda.";
     return View("Index", indexModel);
 }