Esempio n. 1
0
        /// <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));
        }
Esempio n. 2
0
        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));
        }