예제 #1
0
        public ActionResult Index()
        {
            // We only want a list of months in a single array.
            var model = new MonthViewModel
            {
                MonthData = _repository
                            .GetAll()
                            .Select(item => item.MonthName).ToArray()
            };

            return(View(model));
        }
예제 #2
0
 private async Task RefreshCollectionsAsync()
 {
     ViewData["ReadUserId"] = new SelectList(await _systemUserRepository.GetAll(), "Id", "FullName");
     ViewData["MonthId"]    = new SelectList(await _monthRepository.GetAll(), "Id", "ShortDesc");
 }
예제 #3
0
 public async Task <IActionResult> Index()
 {
     ViewData["MonthCollection"] = new SelectList(await _monthRepository.GetAll(), "Nemotecnico", "ShortDesc");
     return(View());
 }
        private async Task RefreshCollections()
        {
            var data = await _monthRepository.GetAll();

            ViewData["MonthCollection"] = new SelectList(data, "Nemotecnico", "ShortDesc");
        }