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

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

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

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