// 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);
        }