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

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

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

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