コード例 #1
0
        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());
        }
コード例 #2
0
        public async Task <ActionResult <StockTrack> > PostStockTrack(StockTrack stockTrack)
        {
            _context.StockTrack.Add(stockTrack);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetStockTrack", new { id = stockTrack.StockTrackId }, stockTrack));
        }
コード例 #3
0
        private void stokTakipToolStripMenuItem_Click(object sender, EventArgs e)
        {
            StockTrack ChildForm = new StockTrack();

            ChildForm.MdiParent = this;
            ChildForm.Show();
        }