示例#1
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            PzElTablLanguage = await _context.PzElTablLanguage
                               .Include(h => h.PzElTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            PzElTablInvariant = PzElTablLanguage.PzElTabl;

            return(Page());
        }
示例#2
0
        public async Task <IActionResult> OnGetAsync(int id)
        {
            PzElTablLanguage = await _context.PzElTablLanguage
                               .Include(h => h.PzElTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            PzElTablInvariant = PzElTablLanguage.PzElTabl;

            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)
        {
            PzElTablLanguage = await _context.PzElTablLanguage
                               .Include(h => h.PzElTabl)
                               .FirstOrDefaultAsync(m => m.Id == id);

            PzElTablInvariant = PzElTablLanguage.PzElTabl;

            _context.PzElTablLanguage.Remove(PzElTablLanguage);
            _context.PzElTablInvariant.Remove(PzElTablInvariant);


            await _context.SaveChangesAsync();

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

                );

            return(Redirect(url));
        }