Esempio n. 1
0
        public async Task <IActionResult> PutLocation(int id, Location location)
        {
            if (id != location.Gcode)
            {
                return(BadRequest());
            }

            _context.Entry(location).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!LocationExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 2
0
        public async Task <ActionResult <Pocan2> > PostPocan2(Pocan2 pocan2)
        {
            _context.Pocan2s.Add(pocan2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPocan2s", new { id = pocan2.Id }, pocan2));
        }
Esempio n. 3
0
        public async Task <IActionResult> PutProduct(string id, Product product)
        {
            if (id != product.Pcode)
            {
                return(BadRequest());
            }

            _context.Entry(product).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ProductExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 4
0
        public async Task <ActionResult <Pret2> > PostPret2(Pret2 pret2)
        {
            _context.Pret2s.Add(pret2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPret2s", new { id = pret2.Id }, pret2));
        }
Esempio n. 5
0
        public async Task <ActionResult <Sorder2> > PostSorder2(Sorder2 sorder2)
        {
            _context.Sorder2s.Add(sorder2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetSorder2", new { id = sorder2.Id }, sorder2));
        }
Esempio n. 6
0
        public async Task <ActionResult <Credit> > PostCredit(Credit credit)
        {
            _context.Credits.Add(credit);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCredits", new { id = credit.Id }, credit));
        }
Esempio n. 7
0
        public async Task <ActionResult <Stockpo> > PostStockpo(Stockpo stockpo)
        {
            _context.Stockpos.Add(stockpo);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetStockpos", new { id = stockpo.Id }, stockpo));
        }
Esempio n. 8
0
        public async Task <ActionResult <Salecash2> > PostSalecash2(Salecash2 salecash2)
        {
            _context.Salecash2s.Add(salecash2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetSalecash2s", new { id = salecash2.Id }, salecash2));
        }
Esempio n. 9
0
        public async Task <IActionResult> PutColor(int id, Color color)
        {
            if (id != color.Grp)
            {
                return(BadRequest());
            }

            _context.Entry(color).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!ColorExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 10
0
        public async Task <ActionResult <LesslistNew> > PostLesslistNew(LesslistNew lesslistNew)
        {
            _context.LesslistNews.Add(lesslistNew);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetLesslistNew", new { id = lesslistNew.Id }, lesslistNew));
        }
Esempio n. 11
0
        public async Task <ActionResult <Cashrcp> > PostCashrcp(Cashrcp cashrcp)
        {
            _context.Cashrcps.Add(cashrcp);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCashrcps", new { id = cashrcp.Id }, cashrcp));
        }
Esempio n. 12
0
        public async Task <IActionResult> PutGprice(int id, Gprice gprice)
        {
            if (id != gprice.Id)
            {
                return(BadRequest());
            }

            _context.Entry(gprice).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!GpriceExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 13
0
        public async Task <ActionResult <Purch2> > PostPurch2(Purch2 purch2)
        {
            _context.Purch2s.Add(purch2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPurch2s", new { id = purch2.Id }, purch2));
        }
Esempio n. 14
0
        public async Task <ActionResult <Journal> > PostJournal(Journal journal)
        {
            _context.Journals.Add(journal);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetJournals", new { id = journal.Id }, journal));
        }
Esempio n. 15
0
        public async Task <IActionResult> PutSale1(int id, Sale1 sale1)
        {
            if (id != sale1.No)
            {
                return(BadRequest());
            }

            _context.Entry(sale1).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Sale1Exists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 16
0
        public async Task <ActionResult <Prdinfo> > PostPrdinfo(Prdinfo prdinfo)
        {
            _context.Prdinfos.Add(prdinfo);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPrdinfos", new { id = prdinfo.Id }, prdinfo));
        }
Esempio n. 17
0
        public async Task <ActionResult <Bankjv> > PostBankjv(Bankjv bankjv)
        {
            _context.Bankjvs.Add(bankjv);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetBankjvs", new { id = bankjv.Id }, bankjv));
        }
Esempio n. 18
0
        public async Task <ActionResult <Claim2> > PostClaim2(Claim2 claim2)
        {
            _context.Claim2s.Add(claim2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetClaim2s", new { id = claim2.Id }, claim2));
        }
Esempio n. 19
0
        public async Task <ActionResult <Pujournal> > PostPujournal(Pujournal pujournal)
        {
            _context.Pujournals.Add(pujournal);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPujournals", new { id = pujournal.Id }, pujournal));
        }
Esempio n. 20
0
        public async Task <ActionResult <Sljournal> > PostSljournal(Sljournal sljournal)
        {
            _context.Sljournals.Add(sljournal);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetSljournals", new { id = sljournal.Id }, sljournal));
        }
Esempio n. 21
0
        public async Task <ActionResult <Sret2> > PostSret2(Sret2 sret2)
        {
            _context.Sret2s.Add(sret2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetSret2s", new { id = sret2.Id }, sret2));
        }
Esempio n. 22
0
        public async Task <IActionResult> PutTransport(short id, Transport transport)
        {
            if (id != transport.Tcode)
            {
                return(BadRequest());
            }

            _context.Entry(transport).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TransportExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 23
0
        public async Task <ActionResult <Opjournal> > PostOpjournal(Opjournal opjournal)
        {
            _context.Opjournals.Add(opjournal);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetOpjournals", new { id = opjournal.Id }, opjournal));
        }
Esempio n. 24
0
        public async Task <ActionResult <Mprodtn2> > PostMprodtn2(Mprodtn2 mprodtn2)
        {
            _context.Mprodtn2s.Add(mprodtn2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetMprodtn2s", new { id = mprodtn2.Id }, mprodtn2));
        }
Esempio n. 25
0
        public async Task <ActionResult <StockColor> > PostStockColor(StockColor stockColor)
        {
            _context.StockColors.Add(stockColor);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetStockColors", new { id = stockColor.Id }, stockColor));
        }
Esempio n. 26
0
        public async Task <ActionResult <Cashpym> > PostCashpym(Cashpym cashpym)
        {
            _context.Cashpyms.Add(cashpym);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCashpyms", new { id = cashpym.Id }, cashpym));
        }
Esempio n. 27
0
        public async Task <ActionResult <Gin2> > PostGin2(Gin2 gin2)
        {
            _context.Gin2s.Add(gin2);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetGin2s", new { id = gin2.Id }, gin2));
        }
Esempio n. 28
0
        public async Task <ActionResult <Debit> > PostDebit(Debit debit)
        {
            _context.Debits.Add(debit);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetDebits", new { id = debit.Id }, debit));
        }
Esempio n. 29
0
        public async Task <IActionResult> PutPgroup(int id, Pgroup pgroup)
        {
            if (id != pgroup.Pgrp)
            {
                return(BadRequest());
            }

            _context.Entry(pgroup).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!PgroupExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Esempio n. 30
0
        public async Task <ActionResult <Gnrllgr> > PostGnrllgr(Gnrllgr gnrllgr)
        {
            _context.Gnrllgrs.Add(gnrllgr);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetGnrllgrs", new { id = gnrllgr.Id }, gnrllgr));
        }