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

            db.depoTable.Remove(depoTable);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "id,ad,stok,teminsuresi")] depoTable depoTable)
 {
     if (ModelState.IsValid)
     {
         db.Entry(depoTable).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(depoTable));
 }
Beispiel #3
0
 public ActionResult Create([Bind(Include = "id,ad,stok,teminsuresi")] depoTable depoTable)
 {
     if (ModelState.IsValid)
     {
         db.depoTable.Add(depoTable);
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(depoTable));
 }
Beispiel #4
0
        // GET: yoneticidepo/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            depoTable depoTable = db.depoTable.Find(id);

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