public IHttpActionResult PostCV_USER_INFO(CV_USER_INFO cV_USER_INFO)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.CV_USER_INFO.Add(cV_USER_INFO);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (CV_USER_INFOExists(cV_USER_INFO.ID))
                {
                    return(Conflict());
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtRoute("DefaultApi", new { id = cV_USER_INFO.ID }, cV_USER_INFO));
        }
        public IHttpActionResult PutCV_USER_INFO(int id, CV_USER_INFO cV_USER_INFO)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CV_USER_INFOExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <ActionResult> Create(CV_USER_INFO tipGlasa)
        {
            HttpResponseMessage responseMessage = await client.PostAsJsonAsync(url, tipGlasa);

            if (responseMessage.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            return(RedirectToAction("Error"));
        }
        public async Task <ActionResult> Delete(int id, CV_USER_INFO tipGlasa)
        {
            HttpResponseMessage responseMessage = await client.DeleteAsync(url + "/" + id);

            if (responseMessage.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            return(RedirectToAction("Error"));
        }
        public async Task <ActionResult> Edit(int id, CV_USER_INFO Emp)
        {
            HttpResponseMessage responseMessage = await client.PutAsJsonAsync(url + "/" + id, Emp);

            if (responseMessage.IsSuccessStatusCode)
            {
                return(RedirectToAction("Index"));
            }
            return(RedirectToAction("Error"));
        }
        public IHttpActionResult GetCV_USER_INFO(int id)
        {
            CV_USER_INFO cV_USER_INFO = db.CV_USER_INFO.Find(id);

            if (cV_USER_INFO == null)
            {
                return(NotFound());
            }

            return(Ok(cV_USER_INFO));
        }
        public IHttpActionResult DeleteCV_USER_INFO(int id)
        {
            CV_USER_INFO cV_USER_INFO = db.CV_USER_INFO.Find(id);

            if (cV_USER_INFO == null)
            {
                return(NotFound());
            }

            db.CV_USER_INFO.Remove(cV_USER_INFO);
            db.SaveChanges();

            return(Ok(cV_USER_INFO));
        }