示例#1
0
        // GET: Resources
        public async Task <ActionResult> VolunteerResourcesIndex()
        {
            var model = new VolunteerResourceIndexViewModel {
                Disasters = _disasterSvc.GetActiveList(), CommitmentDate = null
            };

            return(View(model));
        }
示例#2
0
        public async Task <PartialViewResult> ResourcesByDisaster(VolunteerResourceIndexViewModel model)
        {
            var result = new VolunteerResourceIndexViewModel();

            if (model.SelectedDisaster != 0)
            {
                result.Resources = await _resourceSvc.GetResourcesByDisasterAsync(model.SelectedDisaster, model.CommitmentDate);
            }

            return(PartialView("_VolunteerResourceIndexResults", result));
        }