Esempio n. 1
0
        private void PopulateAssignedWAData(OccupationVM occupation)
        {
            var all          = waService.GetAll();
            var occupationWA = new HashSet <int>(occupation.WorkAvailabilities.Select(c => c.WorkAvailabilityId));
            var viewModel    = new List <SelectedItems>();

            foreach (var item in all)
            {
                viewModel.Add(new SelectedItems
                {
                    Id            = item.Id,
                    DescriptionEN = item.DescriptionEN,
                    DescriptionPT = item.DescriptionPT,
                    Assigned      = occupationWA.Contains(item.Id)
                });
            }

            ViewData["WorkAvailabilities"] = viewModel;
        }
Esempio n. 2
0
 public IActionResult Index()
 {
     return(View(waService.GetAll()));
 }