예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            vwFullAdItem vwfulladitem = db.vwFullAdItem.Find(id);

            db.vwFullAdItem.Remove(vwfulladitem);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit(vwFullAdItem vwfulladitem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vwfulladitem).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(vwfulladitem));
 }
예제 #3
0
        //
        // GET: /Default1/Edit/5

        public ActionResult Edit(int id = 0)
        {
            vwFullAdItem vwfulladitem = db.vwFullAdItem.Find(id);

            if (vwfulladitem == null)
            {
                return(HttpNotFound());
            }
            return(View(vwfulladitem));
        }
예제 #4
0
        public ActionResult Create(vwFullAdItem vwfulladitem)
        {
            if (ModelState.IsValid)
            {
                db.vwFullAdItem.Add(vwfulladitem);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(vwfulladitem));
        }