// GET: CommLinks/Delete/5 public ActionResult CommLinkDelete(int?id) { CommLinks commLinks = db.CommLinks.Find((int)id); db.CommLinks.Remove(commLinks); db.SaveChanges(); return(RedirectToAction("CommLinks", "CommHeaders", new { id = commLinks.CommKey })); }
// GET: CommLinks/Create public ActionResult CommLinkCreate(int commKey) { CommLinks newCommLink = new CommLinks(); newCommLink.CommKey = commKey; newCommLink.DistKey = GlobalVariables.DistKey; return(View(newCommLink)); }
public ActionResult CommLinkEdit(CommLinks commLinks) { if (ModelState.IsValid) { commLinks.DistKey = GlobalVariables.DistKey; db.Entry(commLinks).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("CommLinks", "CommHeaders", new { id = commLinks.CommKey })); } return(View("CommLinkEdit", commLinks)); }
public ActionResult CommLinkCreate(CommLinks commLinks) { commLinks.DistKey = GlobalVariables.DistKey; if (ModelState.IsValid) { db.CommLinks.Add(commLinks); db.SaveChanges(); return(RedirectToAction("CommLinks", "CommHeaders", new { id = commLinks.CommKey })); } return(View(commLinks)); }
// GET: CommLinks/Edit/5 public ActionResult CommLinkEdit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CommLinks commLinks = db.CommLinks.Find(id); if (commLinks == null) { return(HttpNotFound()); } return(View("CommLinkEdit", commLinks)); }