Exemplo n.º 1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            ModfTablLanguage = await _context.ModfTablLanguage
                               .Include(h => h.ModfTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            ModfTablInvariant = ModfTablLanguage.ModfTabl;

            return(Page());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            ModfTablLanguage = await _context.ModfTablLanguage
                               .Include(h => h.ModfTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            ModfTablInvariant = ModfTablLanguage.ModfTabl;

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

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

            return(Page());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> OnPostAsync(int id)
        {
            ModfTablLanguage = await _context.ModfTablLanguage
                               .Include(h => h.ModfTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            ModfTablInvariant = ModfTablLanguage.ModfTabl;

            _context.ModfTablLanguage.Remove(ModfTablLanguage);
            _context.ModfTablInvariant.Remove(ModfTablInvariant);


            await _context.SaveChangesAsync();

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

                );

            return(Redirect(url));
        }