public async Task <IActionResult> PutMThrmsinventoryManagementDetails([FromRoute] long id, [FromBody] MThrmsinventoryManagementDetails mThrmsinventoryManagementDetails)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != mThrmsinventoryManagementDetails.MThrmsinventoryManagementDetailsId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> PutMThrmsresourceAllocation([FromRoute] long id, [FromBody] MThrmsresourceAllocation mThrmsresourceAllocation)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != mThrmsresourceAllocation.MThrmsresourceAllocationId)
            {
                return(BadRequest());
            }

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

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!MThrmsresourceAllocationExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }
            return(CreatedAtAction("GetMThrmsresourceAllocation", mThrmsresourceAllocation.MThrmsresourceAllocationId, mThrmsresourceAllocation));
            //return NoContent();
        }
Exemplo n.º 3
0
        public async Task <IActionResult> PutMThrmsfiletest([FromRoute] int id, [FromBody] MThrmsfiletest mThrmsfiletest)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != mThrmsfiletest.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 4
0
        public async Task <IActionResult> PutMThrmsresourceAllocation2([FromRoute] long id, [FromRoute] long recr)
        {
            // if (!ModelState.IsValid)
            // {
            //     return BadRequest(ModelState);
            // }

            // if (id != mThrmsresourceAllocation.MThrmsresourceAllocationId)
            // {
            //     return BadRequest();
            // }

            // _context.Entry(mThrmsresourceAllocation).State = EntityState.Modified;

            // try
            // {
            //     await _context.SaveChangesAsync();
            // }
            // catch (DbUpdateConcurrencyException)
            // {
            //     if (!MThrmsresourceAllocationExists(id))
            //     {
            //         return NotFound();
            //     }
            //     else
            //     {
            //         throw;
            //     }
            // }
            // return CreatedAtAction("GetMThrmsresourceAllocation", mThrmsresourceAllocation.MThrmsresourceAllocationId, mThrmsresourceAllocation);
            AMTDEVContext _context = new AMTDEVContext();
            var           user     = new MThrmsresourceAllocation {
                MThrmsresourceAllocationId = id, RecruiterId = recr
            };

            _context.MThrmsresourceAllocation.Attach(user).Property(x => x.RecruiterId).IsModified = true;
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetMThrmsresourceAllocation", user.MThrmsresourceAllocationId, user));
        }