예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RoofVid roofVid = db.RoofVids.Find(id);

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

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

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