public async Task <ActionResult> EditRoleModal(int personId) { var output = await _peopleAppService.GetPersonForEditAsync(personId); var model = new EditPersonModalViewModel(output); return(View("_EditPeopleModal", model)); }
public async Task <PartialViewResult> EditPersonModal(int personId) { var person = await _personAppService.GetPersonForEdit(new EntityDto { Id = personId }); var viewModel = new EditPersonModalViewModel(person); return(PartialView("_PersonEditModal", viewModel)); }
public async Task <ActionResult> EditPersonModal(int personId) { var person = _personAppService.GetPersonForEdit(new EntityDto <int>(personId)); // dropdown var listaTipiContatto = Enum.GetValues(typeof(TipiContatto)).Cast <TipiContatto>().Select(v => new SelectListItem { Text = v.ToString(), Value = ((int)v).ToString() }).ToList(); var model = new EditPersonModalViewModel { Person = person, TipiContatto = listaTipiContatto }; return(View("_EditPersonModal", model)); }