Beispiel #1
0
        public async Task<IHttpActionResult> PutRcbp1(int TrxNo, Rcbp1 rcbp1)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (TrxNo != rcbp1.TrxNo)
            {
                return BadRequest();
            }

            db.Entry(rcbp1).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Rcbp1Exists(TrxNo))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
Beispiel #2
0
        public async Task<IHttpActionResult> PostRcbp1(Rcbp1 rcbp1)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.DtRcbp1.Add(rcbp1);
            await db.SaveChangesAsync();

            return CreatedAtRoute("DefaultApi", new { TrxNo = rcbp1.TrxNo }, rcbp1);
        }