Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Umdns umdns = db.Umdns.Find(id);

            db.Umdns.Remove(umdns);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "UmdnsId,Codigo,NombreCompleto")] Umdns umdns)
 {
     if (ModelState.IsValid)
     {
         db.Entry(umdns).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(umdns));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "UmdnsId,Codigo,NombreCompleto")] Umdns umdns)
        {
            if (ModelState.IsValid)
            {
                db.Umdns.Add(umdns);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(umdns));
        }
Beispiel #4
0
        // GET: Umdns/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Umdns umdns = db.Umdns.Find(id);

            if (umdns == null)
            {
                return(HttpNotFound());
            }
            return(View(umdns));
        }