Beispiel #1
0
        public async Task <IActionResult> Edit(int id, [Bind("SstockId,Active,Item,Persachet,Buffer,IPDSAMZarib,OPDSAMZarib")] TlkpSstock tlkpSstock)
        {
            if (id != tlkpSstock.SstockId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(tlkpSstock);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TlkpSstockExists(tlkpSstock.SstockId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            return(View(tlkpSstock));
        }
Beispiel #2
0
        public async Task <IActionResult> Create([Bind("SstockId,Active,Item,Persachet,Buffer,IPDSAMZarib,OPDSAMZarib")] TlkpSstock tlkpSstock)
        {
            if (ModelState.IsValid)
            {
                _context.Add(tlkpSstock);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(tlkpSstock));
        }