// GET: Administrateur/AssetTypeSupportedMetaDatas/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var assetTypeSupportedMetaData = AssetTypeSupportedMetaDatasService.Get(id); if (assetTypeSupportedMetaData == null) { return(HttpNotFound()); } return(View(assetTypeSupportedMetaData)); }
// 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 public ActionResult Index() { var assetTypeSupportedMetaDatas = AssetTypeSupportedMetaDatasService.Get(); return(View(assetTypeSupportedMetaDatas.ToList())); }
public ActionResult DeleteConfirmed(int id) { AssetTypeSupportedMetaDatasService.Delete(id); return(RedirectToAction("Index")); }