Example #1
0
 public ActionResult Deploy(string spHostUrl)
 {
     var context = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
     var service = new SharePointService(context);
     TempData["Message"] = service.Deploy();
     return RedirectToAction("Home", new { SPHostUrl = spHostUrl });
 }
Example #2
0
 public ActionResult FillHostWebSupportCasesToThreshold(string spHostUrl)
 {
     var context = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
     var service = new SharePointService(context);
     TempData["Message"] = service.FillHostWebSupportCasesToThreshold();
     return RedirectToAction("Home", new { SPHostUrl = spHostUrl });
 }
Example #3
0
 public ActionResult FillAppWebNotesWith1G(string spHostUrl)
 {
     var context = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
     var service = new SharePointService(context);
     var count = service.FillAppWebNotesWith1G();
     TempData["Message"] = count + " items have been added to the App Web Notes list, and every item size is more than 1MB.";
     return RedirectToAction("Home", new { SPHostUrl = spHostUrl });
 }
Example #4
0
    public ActionResult UninstallTheApp(string spHostUrl)
    {
        var context = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
        var service = new SharePointService(context);
        service.UninstallTheApp();
        TempData["Message"] = "The App has been uninstalled successfully.";
        return RedirectToAction("Home", new { SPHostUrl = spHostUrl });
 
    }
Example #5
0
        public ActionResult Home()
        {
            var context = SharePointContextProvider.Current.GetSharePointContext(HttpContext);
            var sharePointService = new SharePointService(context);
            var currentUser = sharePointService.GetCurrentUser();
            ViewBag.UserName = currentUser.Title;

            var surveyRatingsService = new SurveyRatingsService();
            ViewBag.Score = surveyRatingsService.GetUserScore(currentUser.UserId.NameId);

            return View();
        }