Ejemplo n.º 1
0
    public async Task<ActionResult> AppintNewCeo()
    {
      var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

      SpChiefExecutiveRepository repository = new SpChiefExecutiveRepository(spContext);

      await repository.AppointNewCeo();

      return Redirect("/?SPHostUrl=" +spContext.SPHostUrl);
    }
Ejemplo n.º 2
0
    public async Task<ActionResult> RemoveSampleCeo()
    {
      var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

      SpChiefExecutiveRepository repository = new SpChiefExecutiveRepository(spContext);

      await repository.DeleteFirstPerson();

      return Redirect("/?SPHostUrl=" + spContext.SPHostUrl);
    }
Ejemplo n.º 3
0
    // show list of all CEOs
    public async Task<ActionResult> Index() {
      var spContext = SharePointContextProvider.Current.GetSharePointContext(HttpContext);

      SpChiefExecutiveViewModel model = new SpChiefExecutiveViewModel();

      SpChiefExecutiveRepository repository = new SpChiefExecutiveRepository(spContext);
      model.SpChiefExecutives = await repository.GetChiefExecutives();

      return View(model);
    }