public ActionResult Index() { ViewData[TituloPageEnum.TituloPagina.ToString()] = "Perfil"; ViewData[TituloPageEnum.TituloModuloPagina.ToString()] = "Lista Perfil"; var listaPerfil = new GlobaisPermissaoBLL().Select(new GlobaisPermissaoBE { }); var pagesSistema = new GlobaisConfiguracaoBLL().SelectPage(""); foreach (var item in GlobalVariables.EmpresaSelecionada.Modulos) { foreach (var itemPage in item.Paginas) { pagesSistema.Add(new GlobaisConfiguracaoBE { Con_IdItem = itemPage.modPage_url, Con_Descricao = itemPage.modPage_nome, Con_Tipo = "PAG", conf_id = GlobalVariables.User_EmpresaSelecionar }); } } ViewData["perfil"] = listaPerfil; ViewData["page"] = pagesSistema; return(View()); }
public JsonResult CarregaPerfil() { var lista = new GlobaisPermissaoBLL().Select(); var result = (from x in lista select new GlobaisDropDown { Id = x.perm_id.ToString(), Nome = x.perm_nome }); return(Json(result, JsonRequestBehavior.AllowGet)); }