示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            down_11021 down_11021 = db.down_11021.Find(id);

            db.down_11021.Remove(down_11021);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Sr_no,Station_code,Arrival,Departure,Distance,Day")] down_11021 down_11021)
 {
     if (ModelState.IsValid)
     {
         db.Entry(down_11021).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(down_11021));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Sr_no,Station_code,Arrival,Departure,Distance,Day")] down_11021 down_11021)
        {
            if (ModelState.IsValid)
            {
                db.down_11021.Add(down_11021);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

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

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