public async Task <IActionResult> PutStockTrack(long id, StockTrack stockTrack) { if (id != stockTrack.StockTrackId) { return(BadRequest()); } _context.Entry(stockTrack).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!StockTrackExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <StockTrack> > PostStockTrack(StockTrack stockTrack) { _context.StockTrack.Add(stockTrack); await _context.SaveChangesAsync(); return(CreatedAtAction("GetStockTrack", new { id = stockTrack.StockTrackId }, stockTrack)); }
private void stokTakipToolStripMenuItem_Click(object sender, EventArgs e) { StockTrack ChildForm = new StockTrack(); ChildForm.MdiParent = this; ChildForm.Show(); }