Example #1
0
        public ActionResult DeleteConfirmed(Guid id)
        {
            PipeProfile pipeProfile = db.PipeProfiles.Find(id);

            db.PipeProfiles.Remove(pipeProfile);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "Id,Name")] PipeProfile pipeProfile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pipeProfile).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View("~/Areas/Commerce/Views/ProductsRelated/PipeProfiles/Edit.cshtml", pipeProfile));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "Id,Name")] PipeProfile pipeProfile)
        {
            if (ModelState.IsValid)
            {
                pipeProfile.Id = Guid.NewGuid();
                db.PipeProfiles.Add(pipeProfile);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View("~/Areas/Commerce/Views/ProductsRelated/PipeProfiles/Create.cshtml", pipeProfile));
        }
Example #4
0
        // GET: Commerce/PipeProfiles/Delete/5
        public ActionResult Delete(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PipeProfile pipeProfile = db.PipeProfiles.Find(id);

            if (pipeProfile == null)
            {
                return(HttpNotFound());
            }
            return(View("~/Areas/Commerce/Views/ProductsRelated/PipeProfiles/Delete.cshtml", pipeProfile));
        }