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

            db.PlayerFunctions.Remove(playerFunctions);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,PlayerFunctionName,IsPlayer,IsGoalie,IsTrainer,IsManager")] PlayerFunctions playerFunctions)
 {
     if (ModelState.IsValid)
     {
         db.Entry(playerFunctions).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(playerFunctions));
 }
Ejemplo n.º 3
0
        public ActionResult Create([Bind(Include = "Id,PlayerFunctionName,IsPlayer,IsGoalie,IsTrainer,IsManager")] PlayerFunctions playerFunctions)
        {
            if (ModelState.IsValid)
            {
                db.PlayerFunctions.Add(playerFunctions);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(playerFunctions));
        }
Ejemplo n.º 4
0
        // GET: PlayerFunctions/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PlayerFunctions playerFunctions = db.PlayerFunctions.Find(id);

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