예제 #1
0
 public ActionResult CloneSoftwareAsset(int assetId)
 {
     try
     {
         SoftwareAssetModel softwareAssetModel = _assetService.EditCloneSoftwareAsset(assetId);
         var assetCategories = _assetService.GetAssetCategories();
         softwareAssetModel.AssetCategories = new SelectList(assetCategories, "ID", "Description", (int)AssetCategories.Software);
         softwareAssetModel.AssetCategoryId = (int)AssetCategories.Software;
         var assetTypes = _assetService.GetAssetTypes((int)AssetCategories.Software, softwareAssetModel.AssetTypeID);
         softwareAssetModel.AssetTypes = assetTypes;
         return(View("CloneSoftwareAsset", softwareAssetModel));
     }
     catch (Exception ex)
     {
         _logger.Error(ex);
         return(RedirectToAction("ManageAssets"));
     }
 }