Exemplo n.º 1
0
        public SiteConfigController()
        {
            var task = Task.Run(async() => {
                _templates = (await TemplateUtilities.GetTemplates()).ToList();
            });

            task.Wait();
        }
        public PreApprovalController()
        {
            var task = Task.Run(async() => {
                _templates = (await TemplateUtilities.GetTemplates()).ToList();
                _groups    = (await new GraphUtil().GetGroups()).ToList();
            });

            task.Wait();
        }
        public async Task <ActionResult> Index()
        {
            var templates = await TemplateUtilities.GetTemplates();

            if (templates.Count() == 0)
            {
                templates = await TemplateUtilities.InitializeDefaultTemplate(User.Identity.GetEmail());
            }
            return(View(templates));
        }
Exemplo n.º 4
0
        // GET: Admin/BulkInvite
        public async Task <ActionResult> Index()
        {
            var res       = new List <SelectListItem>();
            var templates = (await TemplateUtilities.GetTemplates()).ToList();

            res.AddRange(templates.Select(t => new SelectListItem {
                Selected = (t.TemplateName == "Default"), Text = t.TemplateName, Value = t.Id
            }));
            ViewBag.Templates = res;
            return(View());
        }