Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            up_16332 up_16332 = db.up_16332.Find(id);

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

            return(View(up_16332));
        }
Пример #4
0
        // GET: up_16332/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            up_16332 up_16332 = db.up_16332.Find(id);

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