public ActionResult DeleteConfirmed(int id) { fotbollsplaner fotbollsplaner = db.fotbollsplaners.Find(id); db.fotbollsplaners.Remove(fotbollsplaner); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id, Namn, Adress, Ort, Postnummer, Latitud, Longitud, AntalGras, AntalGrus, AntalKonstGras, Parkering, Omkladnadsrum, Kafe, Restaurang, Upplyst, Bokning, Hemsida, Fritext")] fotbollsplaner fotbollsplaner) { if (ModelState.IsValid) { db.Entry(fotbollsplaner).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(fotbollsplaner)); }
public fotbollsplaner RightClickMapLink(string latlon) { fotbollsplaner model = new fotbollsplaner(); latlon = latlon.Trim(' ').Trim('(').Trim(')'); model.Latitud = latlon.Split(',')[0]; model.Longitud = latlon.Split(',')[1].Trim(' '); return(model); }
// GET: fotbollsplaners/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } fotbollsplaner fotbollsplaner = db.fotbollsplaners.Find(id); if (fotbollsplaner == null) { return(HttpNotFound()); } return(View(fotbollsplaner)); }
public ActionResult Create([Bind(Include = "Id,Namn,Adress,Ort,Postnummer,Latitud,Longitud,AntalGras,AntalGrus,AntalKonstGras,Parkering,Omkladnadsrum,Kafe,Restaurang,Upplyst,Bokning,Hemsida,Fritext")] fotbollsplaner fotbollsplaner) { if (ModelState.IsValid) { db.fotbollsplaners.Add(fotbollsplaner); db.SaveChanges(); ViewBag.SuccessConfirm = "y"; return(View()); } else { return(View()); } }
public ActionResult Planid(string id) { fotbollsplaner aktuellFotbollsplan = db.fotbollsplaners.Find(Convert.ToInt32(id)); return(View("Index", aktuellFotbollsplan)); }