public async Task <IHttpActionResult> PuttXrefUserImmunizationsCode(int id, tXrefUserImmunizationsCode tXrefUserImmunizationsCode)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tXrefUserImmunizationsCode.ID)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> PuttSNPAvailability(int id, tSNPAvailability SNPAvailability)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != SNPAvailability.ID)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
示例#3
0
        public async Task <IHttpActionResult> PuttUserDataErrLog(int id, tUserDataErrLog tUserDataErrLog)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> PuttProviderPhoneNumber(int id, tProviderPhoneNumber ProviderPhoneNumber)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != ProviderPhoneNumber.ID)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
示例#5
0
        public async Task <IHttpActionResult> PuttCredential(int id, tCredential Credential)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != Credential.ID)
            {
                return(BadRequest());
            }

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

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

            return(StatusCode(HttpStatusCode.OK));
        }