public ActionResult DeleteConfirmed(int id) { Decommission decommission = db.Decommissions.Find(id); db.Decommissions.Remove(decommission); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "DecommID,ClusterID,SiteCode,Sitename,DateDecom,Services,Reason")] Decommission decommission) { if (ModelState.IsValid) { db.Entry(decommission).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.ClusterID = new SelectList(db.Clusters, "ClusterID", "ClusterName", decommission.ClusterID); return(View(decommission)); }
public void AddChild(Burden child) { if (dependencies == null) { dependencies = new List <Burden>(Model.Dependents.Length); } dependencies.Add(child); if (child.RequiresDecommission) { decommission = Decommission.Yes; } }
// GET: Decommissions/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Decommission decommission = db.Decommissions.Find(id); if (decommission == null) { return(HttpNotFound()); } return(View(decommission)); }
// GET: Decommissions/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Decommission decommission = db.Decommissions.Find(id); if (decommission == null) { return(HttpNotFound()); } ViewBag.ClusterID = new SelectList(db.Clusters, "ClusterID", "ClusterName", decommission.ClusterID); return(View(decommission)); }
internal Burden(IHandler handler, bool requiresDecommission, bool trackedExternally) { this.handler = handler; TrackedExternally = trackedExternally; if (requiresDecommission) { decommission = Decommission.Yes; } else if (Model.Lifecycle.HasDecommissionConcerns) { if (Model.Implementation == typeof(LateBoundComponent) && Model.Lifecycle.DecommissionConcerns.All(IsLateBound)) { decommission = Decommission.LateBound; } else { decommission = Decommission.Yes; } } }
public void AddChild(Burden child) { if (dependencies == null) { dependencies = new List<Burden>(Model.Dependents.Length); } dependencies.Add(child); if (child.RequiresDecommission) { decommission = Decommission.Yes; } }