Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            gru gru = db.grus.Find(id);

            db.grus.Remove(gru);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "Reference_number,Address,Post_Code,Suburb,Latitude,Longitude,Site_history,Restricted_uses,Map_link")] gru gru)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gru).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gru));
 }
Exemple #3
0
        // GET: gru/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            gru gru = db.grus.Find(id);

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