Beispiel #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            Station_Code station_Code = db.Station_Code.Find(id);

            db.Station_Code.Remove(station_Code);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Station_Code1,Station_name,longitude,latitude")] Station_Code station_Code)
 {
     if (ModelState.IsValid)
     {
         db.Entry(station_Code).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(station_Code));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Station_Code1,Station_name,longitude,latitude")] Station_Code station_Code)
        {
            if (ModelState.IsValid)
            {
                db.Station_Code.Add(station_Code);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(station_Code));
        }
Beispiel #4
0
        // GET: Station_Code/Delete/5
        public ActionResult Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Station_Code station_Code = db.Station_Code.Find(id);

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