Exemple #1
0
 public ActionResult Edit([Bind(Include = "id_assetplatform,id_asset,id_genre,active,created_at,updated_at")] AssetPlatform assetPlatform)
 {
     if (ModelState.IsValid)
     {
         db.Entry(assetPlatform).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_asset = new SelectList(db.Assets, "id_asset", "name", assetPlatform.id_asset);
     ViewBag.id_genre = new SelectList(db.Platforms, "id_platform", "name", assetPlatform.id_genre);
     return(View(assetPlatform));
 }
Exemple #2
0
        // GET: AssetPlatform/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AssetPlatform assetPlatform = db.AssetPlatforms.Find(id);

            if (assetPlatform == null)
            {
                return(HttpNotFound());
            }
            return(View(assetPlatform));
        }
Exemple #3
0
        // GET: AssetPlatform/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AssetPlatform assetPlatform = db.AssetPlatforms.Find(id);

            if (assetPlatform == null)
            {
                return(HttpNotFound());
            }
            ViewBag.id_asset = new SelectList(db.Assets, "id_asset", "name", assetPlatform.id_asset);
            ViewBag.id_genre = new SelectList(db.Platforms, "id_platform", "name", assetPlatform.id_genre);
            return(View(assetPlatform));
        }
Exemple #4
0
 public static string GetDescription(this AssetPlatform platform)
 {
     return(DescriptedEnumReflector.Read(platform, typeof(AssetPlatform)));
 }