public async Task <IActionResult> Edit(int id, [Bind("ShopAdjustID,ShopRef,Reference,TotalLossItems,TotalGainItems,MovementDate,StockCode,MovementType,Qty,Values,CreatedBy,CreatedDate")] shopAdjustments shopAdjustments) { if (id != shopAdjustments.ShopAdjustID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(shopAdjustments); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!shopAdjustmentsExists(shopAdjustments.ShopAdjustID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(shopAdjustments)); }
public async Task <IActionResult> Create([Bind("ShopAdjustID,ShopRef,Reference,TotalLossItems,TotalGainItems,MovementDate,StockCode,MovementType,Qty,Values,CreatedBy,CreatedDate")] shopAdjustments shopAdjustments) { if (ModelState.IsValid) { _context.Add(shopAdjustments); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(shopAdjustments)); }