public async Task <ActionResult> Index(int id = 0, double scroll = 0) { try { var model = new PermissionModel { ProfileId = id, ProfileDictionary = await _dictionaryAllService.GetProfileDictionaryAsync(), Scroll = scroll }; if (id == 0) { model.ScreenList = await _screenService.GetAllAsync(); } else { model.ProfileForScreenList = _permissionService.GetProfileForScreen(id); } return(View(model)); } catch (Exception e) { ShowMessageDialog(MensagensResource.ErroCarregar, e); return(RedirectToAction("Index", "Home")); } }