/// <summary> /// Delete this asset from the database /// </summary> /// <returns></returns> public int Delete() { AuditWizardDataAccess lwDataAccess = new AuditWizardDataAccess(); // ...and audit the deletion AuditTrailEntry ate = new AuditTrailEntry(); ate.Date = DateTime.Now; ate.Class = AuditTrailEntry.CLASS.asset; ate.Type = AuditTrailEntry.TYPE.deleted; ate.Key = _name; ate.AssetID = 0; ate.AssetName = ""; ate.Username = System.Environment.UserName; lwDataAccess.AuditTrailAdd(ate); // Delete the asset lwDataAccess.AssetDelete(this); return(0); }