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

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

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

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