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

            db.MapStyleDefaults.Remove(mapStyleDefault);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 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));
 }
Пример #3
0
        // 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));
        }
Пример #4
0
        // 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));
        }