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)); }
public CountDelegheAttiveResponse getCountDelegheAttive(CountDelegheAttiveRequest request) { SetUserId(request.UserInfo); return(MobileManager.getCountDelegheAttive(request)); }