예제 #1
0
        public ActionResult List(IncomeSearchCriteria criteria)
        {
            IncomeQueryBuilder queryBuilder = new IncomeQueryBuilder(criteria);
            var result  = queryBuilder.Execute(daoTemplate.Session);
            var incomes = result.Results;
            IEnumerable <IncomeListItemViewModel> viewModels = incomes.Select(income => new IncomeListItemViewModel(income));

            ViewData["searchResult"] = result;
            ViewData["categories"]   = _categoryServise.AllVisibleCategories();
            return(View(viewModels));
        }
예제 #2
0
 public ActionResult List(IncomeSearchCriteria criteria)
 {
     IncomeQueryBuilder queryBuilder = new IncomeQueryBuilder(criteria);
     var result = queryBuilder.Execute(daoTemplate.Session);
     var incomes = result.Results;
     IEnumerable<IncomeListItemViewModel> viewModels = incomes.Select(income => new IncomeListItemViewModel(income));
     ViewData["searchResult"] = result;
     ViewData["categories"] = _categoryServise.AllVisibleCategories();
     return View(viewModels);
 }