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

            db.JassGrids.Remove(jassgrid);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        //
        // GET: /Grid/Delete/5

        public ActionResult Delete(int id = 0)
        {
            JassGrid jassgrid = db.JassGrids.Find(id);

            if (jassgrid == null)
            {
                return(HttpNotFound());
            }
            return(View(jassgrid));
        }
Beispiel #3
0
        //
        // GET: /Grid/Edit/5

        public ActionResult Edit(int id = 0)
        {
            JassGrid jassgrid = db.JassGrids.Find(id);

            if (jassgrid == null)
            {
                return(HttpNotFound());
            }
            ViewBag.JassPartitionID = new SelectList(db.JassPartitions, "JassPartitionID", "Name", jassgrid.JassPartitionID);
            return(View(jassgrid));
        }
Beispiel #4
0
 public ActionResult Edit(JassGrid jassgrid)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jassgrid).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.JassPartitionID = new SelectList(db.JassPartitions, "JassPartitionID", "Name", jassgrid.JassPartitionID);
     return(View(jassgrid));
 }
Beispiel #5
0
        public ActionResult Create(JassGrid jassgrid)
        {
            if (ModelState.IsValid)
            {
                db.JassGrids.Add(jassgrid);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.JassPartitionID = new SelectList(db.JassPartitions, "JassPartitionID", "Name", jassgrid.JassPartitionID);
            return(View(jassgrid));
        }