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

            Produs = await _context.Produs
                     .Include(p => p.Supliment).FirstOrDefaultAsync(m => m.ID == id);

            if (Produs == null)
            {
                return(NotFound());
            }
            ViewData["SuplimentID"] = new SelectList(_context.Set <Supliment>(), "ID", "Denumire");
            return(Page());
        }
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Client = await _context.Client
                     .Include(c => c.Produs).FirstOrDefaultAsync(m => m.ID == id);

            if (Client == null)
            {
                return(NotFound());
            }
            ViewData["ProdusID"] = new SelectList(_context.Set <Produs>(), "ID", "Denumire");
            return(Page());
        }
Example #3
0
 public IActionResult OnGet()
 {
     ViewData["SuplimentID"] = new SelectList(_context.Set <Supliment>(), "ID", "Denumire");
     return(Page());
 }
 public IActionResult OnGet()
 {
     ViewData["ProdusID"] = new SelectList(_context.Set <Produs>(), "ID", "Denumire");
     return(Page());
 }