예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            down_16613 down_16613 = db.down_16613.Find(id);

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

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

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