public async Task <IActionResult> Edit(int id, [Bind("SupplierUpdate,Transaction_ID,ProductName")] Sup_Trans sup_Trans) { if (id != sup_Trans.OrderNum) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(sup_Trans); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Sup_TransExists(sup_Trans.OrderNum)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(sup_Trans)); }
public async Task <IActionResult> Create([Bind("SupplierUpdate,Transaction_ID,ProductName")] Sup_Trans sup_Trans) { if (ModelState.IsValid) { _context.Add(sup_Trans); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(sup_Trans)); }