public ActionResult DeleteConfirmed(int id) { MapStyleDefault mapStyleDefault = db.MapStyleDefaults.Find(id); db.MapStyleDefaults.Remove(mapStyleDefault); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,FeatureTypeID,Hue,Saturation,Lightness,Gamma")] MapStyleDefault mapStyleDefault) { if (ModelState.IsValid) { db.Entry(mapStyleDefault).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.FeatureTypeID = new SelectList(db.FeatureTypes, "ID", "FeatureType1", mapStyleDefault.FeatureTypeID); return(View(mapStyleDefault)); }
// GET: /MapStyleDefaults/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MapStyleDefault mapStyleDefault = db.MapStyleDefaults.Find(id); if (mapStyleDefault == null) { return(HttpNotFound()); } return(View(mapStyleDefault)); }
// GET: /MapStyleDefaults/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MapStyleDefault mapStyleDefault = db.MapStyleDefaults.Find(id); if (mapStyleDefault == null) { return(HttpNotFound()); } ViewBag.FeatureTypeID = new SelectList(db.FeatureTypes, "ID", "FeatureType1", mapStyleDefault.FeatureTypeID); return(View(mapStyleDefault)); }