public async Task <IActionResult> Edit(int id, [Bind("LineId,Da5515Id,Dodic,Nomenclature,LotNumber,Qtyissued,ResIssued,Qtyreturned,ResReturned,Notes")] SingleTransactionDetails singleTransactionDetails) { if (id != singleTransactionDetails.LineId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(singleTransactionDetails); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SingleTransactionDetailsExists(singleTransactionDetails.LineId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(singleTransactionDetails)); }
public async Task <IActionResult> Create([Bind("LineId,Da5515Id,Dodic,Nomenclature,LotNumber,Qtyissued,ResIssued,Qtyreturned,ResReturned,Notes")] SingleTransactionDetails singleTransactionDetails) { if (ModelState.IsValid) { _context.Add(singleTransactionDetails); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(singleTransactionDetails)); }