public async Task <IActionResult> Edit(int id, [Bind("ReturnID,ShopRef,WarehouseRef,Reference,TransactionDate,StockCode,QtyReturned,CreatedBy,CreatedDate")] shopReturns shopReturns) { if (id != shopReturns.ReturnID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(shopReturns); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!shopReturnsExists(shopReturns.ReturnID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(shopReturns)); }
public async Task <IActionResult> Create([Bind("ReturnID,ShopRef,WarehouseRef,Reference,TransactionDate,StockCode,QtyReturned,CreatedBy,CreatedDate")] shopReturns shopReturns) { if (ModelState.IsValid) { _context.Add(shopReturns); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(shopReturns)); }