Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            FasadMaterial fasadMaterial = db.FasadMaterials.Find(id);

            db.FasadMaterials.Remove(fasadMaterial);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "Id,Material")] FasadMaterial fasadMaterial)
 {
     if (ModelState.IsValid)
     {
         db.Entry(fasadMaterial).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(fasadMaterial));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "Id,Material")] FasadMaterial fasadMaterial)
        {
            if (ModelState.IsValid)
            {
                db.FasadMaterials.Add(fasadMaterial);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(fasadMaterial));
        }
Esempio n. 4
0
        // GET: FasadMaterials/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            FasadMaterial fasadMaterial = db.FasadMaterials.Find(id);

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