Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            mahalle mahalle = db.mahalle.Find(id);

            db.mahalle.Remove(mahalle);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "mahalleID,semtID,ad")] mahalle mahalle)
 {
     if (ModelState.IsValid)
     {
         db.Entry(mahalle).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.semtID = new SelectList(db.semt, "semtID", "ad", mahalle.semtID);
     return(View(mahalle));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "mahalleID,semtID,ad")] mahalle mahalle)
        {
            if (ModelState.IsValid)
            {
                db.mahalle.Add(mahalle);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.semtID = new SelectList(db.semt, "semtID", "ad", mahalle.semtID);
            return(View(mahalle));
        }
Example #4
0
        // GET: mahalles/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            mahalle mahalle = db.mahalle.Find(id);

            if (mahalle == null)
            {
                return(HttpNotFound());
            }
            return(View(mahalle));
        }
Example #5
0
        // GET: mahalles/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            mahalle mahalle = db.mahalle.Find(id);

            if (mahalle == null)
            {
                return(HttpNotFound());
            }
            ViewBag.semtID = new SelectList(db.semt, "semtID", "ad", mahalle.semtID);
            return(View(mahalle));
        }