public ActionResult DeleteConfirmed(int id)
        {
            ConnectNumber connectNumber = db.ConnectNumbers.Find(id);

            db.ConnectNumbers.Remove(connectNumber);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "Id,Icon,Title,Content")] ConnectNumber connectNumber)
 {
     if (ModelState.IsValid)
     {
         db.Entry(connectNumber).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(connectNumber));
 }
        public ActionResult Create([Bind(Include = "Id,Icon,Title,Content")] ConnectNumber connectNumber)
        {
            if (ModelState.IsValid)
            {
                db.ConnectNumbers.Add(connectNumber);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(connectNumber));
        }
        // GET: Admin/ConnectNumber/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ConnectNumber connectNumber = db.ConnectNumbers.Find(id);

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