예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            our_skill our_skill = db.our_skill.Find(id);

            db.our_skill.Remove(our_skill);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
 public ActionResult Edit([Bind(Include = "id,name,value")] our_skill our_skill)
 {
     if (ModelState.IsValid)
     {
         db.Entry(our_skill).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(our_skill));
 }
예제 #3
0
        public ActionResult Create([Bind(Include = "id,name,value")] our_skill our_skill)
        {
            if (ModelState.IsValid)
            {
                db.our_skill.Add(our_skill);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(our_skill));
        }
예제 #4
0
        // GET: Admins/our_skill/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            our_skill our_skill = db.our_skill.Find(id);

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