Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ilce ilce = db.ilce.Find(id);

            db.ilce.Remove(ilce);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        //
        // GET: /ilce/Delete/5

        public ActionResult Delete(int id = 0)
        {
            ilce ilce = db.ilce.Find(id);

            if (ilce == null)
            {
                return(HttpNotFound());
            }
            return(View(ilce));
        }
Ejemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "ilceID,ilID,ad")] ilce ilce)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ilce).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ilID = new SelectList(db.il, "ilID", "ad", ilce.ilID);
     return(View(ilce));
 }
 public ActionResult Edit(ilce ilce)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ilce).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.il_no = new SelectList(db.il, "il_no", "il_ad", ilce.il_no);
     return(View(ilce));
 }
        //
        // GET: /ilce/Edit/5

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

            if (ilce == null)
            {
                return(HttpNotFound());
            }
            ViewBag.il_no = new SelectList(db.il, "il_no", "il_ad", ilce.il_no);
            return(View(ilce));
        }
Ejemplo n.º 6
0
        public ActionResult Create([Bind(Include = "ilceID,ilID,ad")] ilce ilce)
        {
            if (ModelState.IsValid)
            {
                db.ilce.Add(ilce);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.ilID = new SelectList(db.il, "ilID", "ad", ilce.ilID);
            return(View(ilce));
        }
        public ActionResult Create(ilce ilce)
        {
            if (ModelState.IsValid)
            {
                db.ilce.Add(ilce);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.il_no = new SelectList(db.il, "il_no", "il_ad", ilce.il_no);
            return(View(ilce));
        }
Ejemplo n.º 8
0
        // GET: ilces/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ilce ilce = db.ilce.Find(id);

            if (ilce == null)
            {
                return(HttpNotFound());
            }
            return(View(ilce));
        }
Ejemplo n.º 9
0
        // GET: ilces/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ilce ilce = db.ilce.Find(id);

            if (ilce == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ilID = new SelectList(db.il, "ilID", "ad", ilce.ilID);
            return(View(ilce));
        }