예제 #1
0
        public async Task <IActionResult> OnPostAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SellDocSeriesDef = await _context.SellDocSeriesDefs.FindAsync(id);

            if (SellDocSeriesDef != null)
            {
                _context.SellDocSeriesDefs.Remove(SellDocSeriesDef);
                await _context.SaveChangesAsync();
            }

            return(RedirectToPage("./Index"));
        }
예제 #2
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            SellDocSeriesDef = await _context.SellDocSeriesDefs
                               .Include(s => s.Company)
                               .Include(s => s.SellDocTypeDef).FirstOrDefaultAsync(m => m.Id == id);

            if (SellDocSeriesDef == null)
            {
                return(NotFound());
            }
            return(Page());
        }