Esempio n. 1
0
        public ActionResult Index()
        {
            logger.Info("begin");
            logger.Info("UserAgent: " + Request.UserAgent);
            if (NavigationHandler.CurrentUser == null)
            {
                return(RedirectToAction("Login", "Login"));
            }
            MainModel model = NavigationHandler.Model;

            if (model == null)
            {
                //dopo la login.
                model = new ToDoListCommand().Execute();
                //calcolo delege in esercizio
                CountDelegheAttiveRequest cdr = new CountDelegheAttiveRequest();
                cdr.UserInfo = NavigationHandler.CurrentUser;
                CountDelegheAttiveResponse resp = WSStub.getCountDelegheAttive(cdr);
                int numDeleghe = resp.NumDeleghe;
                //inserimento nel model
                model.NumDeleghe = numDeleghe;
            }
            else
            {
                //dopo il refresh
                model.NumDeleghe = 0;
            }
            logger.Info("end");
            return(View(model));
        }
Esempio n. 2
0
 public CountDelegheAttiveResponse getCountDelegheAttive(CountDelegheAttiveRequest request)
 {
     SetUserId(request.UserInfo);
     return(MobileManager.getCountDelegheAttive(request));
 }