Esempio n. 1
0
        public MesViewModel GetMes(ContextModel context)
        {
            var result = new MesViewModel
            {
                machines = GetVueModel(context.ActualPlant, context.AllMachines, !(context.User.Role == enRole.Administrator ||
                                                                                   context.User.Role == enRole.Demo ||
                                                                                   context.User.Role == enRole.Assistance))
            };

            return(result);
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            if (!_contextService.InitializeMesLevel())
            {
                //sbagliato, la action Logout su MesController non esiste
                return(RedirectToAction("Logout", "Account", new { returnUrl = string.Empty, exception = 3 }));
            }
            _contextService.SetActualLanguage(CultureInfo.CurrentCulture.Name);

            ContextModel context = _contextService.GetContext();
            MesViewModel mes     = _mesViewService.GetMes(context);

            return(View("Mes", mes));
        }