コード例 #1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            AcOpTablLanguage = await _context.AcOpTablLanguage
                               .Include(h => h.AcOpTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            AcOpTablInvariant = AcOpTablLanguage.AcOpTabl;

            return(Page());
        }
コード例 #2
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            AcOpTablLanguage = await _context.AcOpTablLanguage
                               .Include(h => h.AcOpTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            AcOpTablInvariant = AcOpTablLanguage.AcOpTabl;

            var singCodes = await _context.SingTabl.Select(s => s.SingType).Distinct().ToListAsync();

            ViewData["SingCode"] = new SelectList(singCodes);

            return(Page());
        }
コード例 #3
0
        public async Task <IActionResult> OnPostAsync(int id)
        {
            AcOpTablLanguage = await _context.AcOpTablLanguage
                               .Include(h => h.AcOpTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            AcOpTablInvariant = AcOpTablLanguage.AcOpTabl;

            _context.AcOpTablLanguage.Remove(AcOpTablLanguage);
            _context.AcOpTablInvariant.Remove(AcOpTablInvariant);


            await _context.SaveChangesAsync();

            var url = _urlBuilder.BuildPropertyLink(
                this.GetLanguage(),
                "AcoustoOptical",
                system: _contextUtils.GetSystemUrlByHeadClue(AcOpTablInvariant.HeadClue)

                );

            return(Redirect(url));
        }