示例#1
0
        public ActionResult DeleteConfirmed(decimal id)
        {
            ODATIPI odatipi = db.ODATIPI.Find(id);

            db.ODATIPI.Remove(odatipi);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
        public ActionResult Delete(decimal id = 0)
        {
            ODATIPI odatipi = db.ODATIPI.Find(id);

            if (odatipi == null)
            {
                return(HttpNotFound());
            }
            return(View(odatipi));
        }
示例#3
0
 public ActionResult Edit(ODATIPI odatipi)
 {
     if (ModelState.IsValid)
     {
         db.Entry(odatipi).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(odatipi));
 }
示例#4
0
        public ActionResult Create(ODATIPI odatipi)
        {
            if (ModelState.IsValid)
            {
                db.ODATIPI.Add(odatipi);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(odatipi));
        }