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

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

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

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