// GET: Administrateur/AssetTypeSupportedMetaDatas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var assetTypeSupportedMetaData = AssetTypeSupportedMetaDatasService.Get(id); if (assetTypeSupportedMetaData == null) { return(HttpNotFound()); } ViewBag.AssetTypeID = new SelectList(AssetTypeService.GetAssetTypes(), "AssetTypeID", "TypeLabel", assetTypeSupportedMetaData.AssetTypeID); ViewBag.MetaDataID = new SelectList(MetaDataService.GetMetaDatas(), "MetaDataID", "Title", assetTypeSupportedMetaData.MetaDataID); return(View(assetTypeSupportedMetaData)); }
public ActionResult Edit([Bind(Include = "AssetSupportedMetaDataID,AssetTypeID,MetaDataID")] AssetTypeSupportedMetaData assetTypeSupportedMetaData) { try { if (ModelState.IsValid) { AssetTypeSupportedMetaDatasService.Update(assetTypeSupportedMetaData); return(RedirectToAction("Index")); } ViewBag.AssetTypeID = new SelectList(AssetTypeService.GetAssetTypes(), "AssetTypeID", "TypeLabel", assetTypeSupportedMetaData.AssetTypeID); ViewBag.MetaDataID = new SelectList(MetaDataService.GetMetaDatas(), "MetaDataID", "Title", assetTypeSupportedMetaData.MetaDataID); return(View(assetTypeSupportedMetaData)); } catch (Exception ex) { return(View("Error", new HandleErrorInfo(ex, "AssetTypeSupportedMetaDatas", "Edit"))); } }
// GET: Administrateur/AssetTypeSupportedMetaDatas/Create public ActionResult Create() { ViewBag.AssetTypeID = new SelectList(AssetTypeService.GetAssetTypes(), "AssetTypeID", "TypeLabel"); ViewBag.MetaDataID = new SelectList(MetaDataService.GetMetaDatas(), "MetaDataID", "Title"); return(View()); }