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

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

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

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