コード例 #1
0
ファイル: Delete.cshtml.cs プロジェクト: vhurryharry/Konekta
        public async Task <IActionResult> OnPostAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            IntegrationLinkSetting = await _wcaDbContext.IntegrationLinkSettings.FindAsync(id);

            if (IntegrationLinkSetting != null)
            {
                _wcaDbContext.IntegrationLinkSettings.Remove(IntegrationLinkSetting);
                await _wcaDbContext.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
コード例 #2
0
ファイル: Delete.cshtml.cs プロジェクト: vhurryharry/Konekta
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            IntegrationLinkSetting = await _wcaDbContext.IntegrationLinkSettings
                                     .Include(i => i.ActionstepOrg)
                                     .Include(i => i.IntegrationLink)
                                     .Include(i => i.User).FirstOrDefaultAsync(m => m.Id == id);

            if (IntegrationLinkSetting == null)
            {
                return(NotFound());
            }
            return(Page());
        }
コード例 #3
0
ファイル: Edit.cshtml.cs プロジェクト: vhurryharry/Konekta
        public async Task <IActionResult> OnGetAsync(Guid?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            IntegrationLinkSetting = await _wcaDbContext.IntegrationLinkSettings
                                     .Include(i => i.ActionstepOrg)
                                     .Include(i => i.IntegrationLink)
                                     .Include(i => i.User).FirstOrDefaultAsync(m => m.Id == id);

            if (IntegrationLinkSetting == null)
            {
                return(NotFound());
            }
            ViewData["ActionstepOrgKey"]  = new SelectList(_wcaDbContext.ActionstepOrgs.OrderBy(u => u.Key), "Key", "Key");
            ViewData["IntegrationLinkId"] = new SelectList(_wcaDbContext.IntegrationLinks.OrderBy(u => u.Title), "Id", "Title");
            ViewData["UserId"]            = new SelectList(_wcaDbContext.Users.OrderBy(u => u.Email), "Id", "Email");
            return(Page());
        }