Ejemplo n.º 1
0
        public IHttpActionResult PutVeLogData(int id, VeLogData veLogData)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
Ejemplo n.º 2
0
        public IHttpActionResult PuttblvelogCours(int id, tblvelogCours tblvelogCours)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "Id,Username,Password,Role")] tblvelogUser tblvelogUser)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tblvelogUser).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tblvelogUser));
 }