public async Task <ActionResult> Index(int Id)
        {
            var token = await O365Util.GetAccessToken(ServiceResources.DemoSite);

            MailAFOModel dashboardModel = new MailAFOModel(token);
            var          model          = await dashboardModel.GetMailAFOViewModel(Id);

            if (model == null)
            {
                return(new RedirectResult("/MailAFO/Index"));
            }

            return(View(model));
        }
コード例 #2
0
        public async Task <ActionResult> Index(int Id)
        {
            var token = await AuthenticationHelper.GetAccessTokenAsync(AppSettings.DemoSiteServiceResourceId);

            MailAFOModel dashboardModel = new MailAFOModel(token);
            var          model          = await dashboardModel.GetMailAFOViewModelAsync(Id);

            if (model == null)
            {
                return(Content("Incident not found"));
            }

            return(View(model));
        }