/// <summary> /// Affiche la page de configuration /// </summary> /// <returns></returns> public ActionResult Index() { ConfigurationIndexViewModel Civm = new ConfigurationIndexViewModel() { ListRoleWithActionTuple = actionLogic.GetListTupleRoleAction(roleLogic.List()) }; int idCurrentUser = (int)Session["userId"]; Session["notifs"] = notificationLogic.ListAllForUser(idCurrentUser).FindAll(n => n.IsRead == 0).Count; return(View(Civm)); }
public ActionResult Index() { var model = new ConfigurationIndexViewModel(); model.MainMenu = _mainMenu; model.CurrentMenu = PageInfo; model.IsNotViewer = (CurrentUser.UserRole != Enums.UserRole.Viewer); model.Detail = Mapper.Map <List <ConfigurationViewModel> >(configService.GetAllList()); var list = new List <ConfigurationViewModel>(model.Detail); model.Detail = new List <ConfigurationViewModel>(); foreach (var item in list) { model.Detail.Add(item); } return(View("Index", model)); }