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

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            BitacoraGembaWalk BitacoraGembaWalk = db.BitacoraGembaWalks.Find(id);

            db.BitacoraGembaWalks.Remove(BitacoraGembaWalk);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 3
0
        public IHttpActionResult GetBitacoraJustDoIt(int id)
        {
            BitacoraGembaWalk BitacoraGembaWalk = db.BitacoraGembaWalks.Find(id);

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

            return(Ok(BitacoraGembaWalk));
        }
Ejemplo n.º 4
0
        public IHttpActionResult PostBitacoraJustDoIt(BitacoraGembaWalk BitacoraGembaWalk)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.BitacoraGembaWalks.Add(BitacoraGembaWalk);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = BitacoraGembaWalk.Id }, BitacoraGembaWalk));
        }
 public ActionResult Edit([Bind(Include = "Id,IdGembaWalk,IdStatus,IdResponsable,IdRechazo,Fecha,Comentario")] BitacoraGembaWalk BitacoraGembaWalk)
 {
     if (ModelState.IsValid)
     {
         db.Entry(BitacoraGembaWalk).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.IdStatus      = new SelectList(db.Estatus, "Id", "Nombre", BitacoraGembaWalk.IdStatus);
     ViewBag.IdGembaWalk   = new SelectList(db.GembaWalk, "Id", "Descripcion", BitacoraGembaWalk.IdGembaWalk);
     ViewBag.IdResponsable = new SelectList(db.Personas, "Id", "Nombre", BitacoraGembaWalk.IdResponsable);
     return(View(BitacoraGembaWalk));
 }
        // GET: Operaciones/BitacoraGembaWalk/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BitacoraGembaWalk BitacoraGembaWalk = db.BitacoraGembaWalks.Find(id);

            if (BitacoraGembaWalk == null)
            {
                return(HttpNotFound());
            }
            return(View(BitacoraGembaWalk));
        }
Ejemplo n.º 7
0
        public IHttpActionResult DeleteBitacoraJustDoIt(int id)
        {
            BitacoraGembaWalk BitacoraGembaWalk = db.BitacoraGembaWalks.Find(id);

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

            db.BitacoraGembaWalks.Remove(BitacoraGembaWalk);
            db.SaveChanges();

            return(Ok(BitacoraGembaWalk));
        }
        // GET: Operaciones/BitacoraGembaWalk/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            BitacoraGembaWalk BitacoraGembaWalk = db.BitacoraGembaWalks.Find(id);

            if (BitacoraGembaWalk == null)
            {
                return(HttpNotFound());
            }
            ViewBag.IdStatus      = new SelectList(db.Estatus, "Id", "Nombre", BitacoraGembaWalk.IdStatus);
            ViewBag.IdGembaWalk   = new SelectList(db.GembaWalk, "Id", "Descripcion", BitacoraGembaWalk.IdGembaWalk);
            ViewBag.IdResponsable = new SelectList(db.Personas, "Id", "Nombre", BitacoraGembaWalk.IdResponsable);
            return(View(BitacoraGembaWalk));
        }