Esempio n. 1
0
        // 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 }));
        }
Esempio n. 2
0
        // GET: CommLinks/Create
        public ActionResult CommLinkCreate(int commKey)
        {
            CommLinks newCommLink = new CommLinks();

            newCommLink.CommKey = commKey;
            newCommLink.DistKey = GlobalVariables.DistKey;
            return(View(newCommLink));
        }
Esempio n. 3
0
 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));
 }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        // 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));
        }