Esempio n. 1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            EsOpTablLanguage = await _context.EsOpTablLanguage
                               .Include(h => h.EsOpTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            EsOpTablInvariant = EsOpTablLanguage.EsOpTabl;

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

            EsOpTablInvariant = EsOpTablLanguage.EsOpTabl;

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

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

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

            EsOpTablInvariant = EsOpTablLanguage.EsOpTabl;

            _context.EsOpTablLanguage.Remove(EsOpTablLanguage);
            _context.EsOpTablInvariant.Remove(EsOpTablInvariant);


            await _context.SaveChangesAsync();

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

                );

            return(Redirect(url));
        }