コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            PCtoFeatureBinding pCtoFeatureBinding = db.PCFeatures.Find(id);

            db.PCFeatures.Remove(pCtoFeatureBinding);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "PCtoFEBindID,PCID,FeatureID")] PCtoFeatureBinding pCtoFeatureBinding)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pCtoFeatureBinding).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.FeatureID = new SelectList(db.Features, "FeatureID", "Name", pCtoFeatureBinding.FeatureID);
     ViewBag.PCID      = new SelectList(db.PlayerCharacters, "PCID", "Name", pCtoFeatureBinding.PCID);
     return(View(pCtoFeatureBinding));
 }
コード例 #3
0
        // GET: BindFeatures/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PCtoFeatureBinding pCtoFeatureBinding = db.PCFeatures.Find(id);

            if (pCtoFeatureBinding == null)
            {
                return(HttpNotFound());
            }
            return(View(pCtoFeatureBinding));
        }
コード例 #4
0
        // GET: BindFeatures/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PCtoFeatureBinding pCtoFeatureBinding = db.PCFeatures.Find(id);

            if (pCtoFeatureBinding == null)
            {
                return(HttpNotFound());
            }
            ViewBag.FeatureID = new SelectList(db.Features, "FeatureID", "Name", pCtoFeatureBinding.FeatureID);
            ViewBag.PCID      = new SelectList(db.PlayerCharacters, "PCID", "Name", pCtoFeatureBinding.PCID);
            return(View(pCtoFeatureBinding));
        }