public ActionResult NewAsset() { FixAssetManagementProcess assetManagement = new FixAssetManagementProcess(); LocationProcess location = new LocationProcess(); IssuerProcess issuer = new IssuerProcess(); ViewBag.Location = location.GetLocations(); ViewBag.Issuer = issuer.GetIssuers(); ViewBag.AssetType = assetManagement.GetAssetTypes(); ViewBag.AssetStatus = assetManagement.GetAssetStatus(); ViewBag.AssetClass = assetManagement.GetAssetClasses(); return(View(new FixAssetViewModel())); }
public ActionResult FixAssetReport() { ReportsProcess reportsProcess = new ReportsProcess(); var assetList = reportsProcess.GetFixAssetList().ToList(); IssuerProcess issuerProcess = new IssuerProcess(); LocationProcess locationProcess = new LocationProcess(); FixAssetManagementProcess assetClass = new FixAssetManagementProcess(); FixAssetManagementProcess assetType = new FixAssetManagementProcess(); FixAssetManagementProcess assetStatus = new FixAssetManagementProcess(); ViewBag.Issuers = issuerProcess.GetIssuers().ToList(); ViewBag.Locations = locationProcess.GetLocations().ToList(); ViewBag.AssetClass = assetClass.GetAssetClasses().ToList(); ViewBag.AssetType = assetType.GetAssetTypes().ToList(); ViewBag.AssetStatus = assetStatus.GetAssetStatus().ToList(); return(View(assetList)); }
public ActionResult EditAsset(int mod) { int FixAssetID = mod; FixAssetManagementProcess assetManagement = new FixAssetManagementProcess(); LocationProcess location = new LocationProcess(); IssuerProcess issuer = new IssuerProcess(); var AssetDetails = assetManagement.GetAllAssets().Where(k => k.FixAssetID == FixAssetID).Select(k => new FixAssetViewModel { FixAssetID = k.FixAssetID, Model = k.Model, SerialNumber = k.SerialNumber, AssetTag = k.AssetTag, Brand = k.Brand, Remarks = k.Remarks, AcquisitionDate = k.AcquisitionDate, ExpiryDate = k.ExpiryDate, Issuer = k.Issuer, IssuerID = k.IssuerID, Location = k.Location, LocationID = k.LocationID, AssetType = k.AssetType, AssetTypeID = k.AssetTypeID, AssetStatus = k.AssetStatus, AssetStatusID = k.AssetStatusID, AssetClass = k.AssetClass, AssetClassID = k.AssetClassID }).FirstOrDefault(); ViewBag.Location = location.GetLocations(); ViewBag.Issuer = issuer.GetIssuers(); ViewBag.AssetType = assetManagement.GetAssetTypes(); ViewBag.AssetStatus = assetManagement.GetAssetStatus(); ViewBag.AssetClass = assetManagement.GetAssetClasses(); return(View(AssetDetails)); }
public LocationController(LocationProcess locationProcess) { _locationProcess = locationProcess; }