예제 #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            t_catego t_catego = db.t_catego.Find(id);

            db.t_catego.Remove(t_catego);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "categoria,descripcion,nota")] t_catego t_catego)
 {
     if (ModelState.IsValid)
     {
         db.Entry(t_catego).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(t_catego));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "categoria,descripcion,nota")] t_catego t_catego)
        {
            if (ModelState.IsValid)
            {
                db.t_catego.Add(t_catego);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(t_catego));
        }
예제 #4
0
        // GET: t_catego/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            t_catego t_catego = db.t_catego.Find(id);

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