Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            Bandwidth_Plans bandwidth_Plans = db.Bandwidth_Plans.Find(id);

            db.Bandwidth_Plans.Remove(bandwidth_Plans);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "Id,Bandwidth_Name,Rate_Download,Rate_Upload,Remarks")] Bandwidth_Plans bandwidth_Plans)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bandwidth_Plans).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bandwidth_Plans));
 }
Example #3
0
        public ActionResult Create([Bind(Include = "Id,Bandwidth_Name,Rate_Download,Rate_Upload,Remarks")] Bandwidth_Plans bandwidth_Plans)
        {
            if (ModelState.IsValid)
            {
                db.Bandwidth_Plans.Add(bandwidth_Plans);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bandwidth_Plans));
        }
Example #4
0
        // GET: Bandwidth_Plans/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Bandwidth_Plans bandwidth_Plans = db.Bandwidth_Plans.Find(id);

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