public ActionResult DeleteConfirmed(int id)
        {
            IntExtPhone intextphone = db.IntExtPhones.Find(id);

            db.IntExtPhones.Remove(intextphone);
            db.SaveChanges();
            return(RedirectToAction("IntExtPhone"));
        }
 public ActionResult Edit([Bind(Include = "Id,LocationName,PhoneNumber,Type")] IntExtPhone intextphone)
 {
     if (ModelState.IsValid)
     {
         db.Entry(intextphone).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("IntExtPhone"));
     }
     return(View(intextphone));
 }
        public ActionResult Create([Bind(Include = "Id,LocationName,PhoneNumber,Type")] IntExtPhone intextphone)
        {
            if (ModelState.IsValid)
            {
                db.IntExtPhones.Add(intextphone);
                db.SaveChanges();
                return(RedirectToAction("IntExtPhone"));
            }

            return(View(intextphone));
        }
        // GET: /Phone/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            IntExtPhone intextphone = db.IntExtPhones.Find(id);

            if (intextphone == null)
            {
                return(HttpNotFound());
            }
            return(View(intextphone));
        }