Replace machinetypeid 33-43 checks with pctypeid throughout codebase
- PCs now identified by pctypeid IS NOT NULL (not machinetypeid >= 33) - Equipment identified by pctypeid IS NULL (not machinetypeid < 33) - Updated 8 files: search.asp, savemachineedit.asp, displaymachine.asp, displaypc.asp, displaypcs.asp, machine_map.asp, displaymachines.asp, api.asp - Simplified queries and removed redundant machinetypeid checks - Updated all related comments to reflect new pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -553,15 +553,12 @@
|
||||
If Not rsCheck.EOF Then dualpathTypeID = rsCheck("relationshiptypeid")
|
||||
rsCheck.Close
|
||||
|
||||
' Check if this machine is a PC (machinetypeid >= 33) to determine relationship direction
|
||||
Dim isPC, currentMachineTypeID
|
||||
' Check if this machine is a PC (pctypeid IS NOT NULL) to determine relationship direction
|
||||
Dim isPC
|
||||
isPC = False
|
||||
Set rsCheck = objConn.Execute("SELECT machinetypeid FROM machines WHERE machineid = " & CLng(machineid))
|
||||
Set rsCheck = objConn.Execute("SELECT pctypeid FROM machines WHERE machineid = " & CLng(machineid))
|
||||
If Not rsCheck.EOF Then
|
||||
currentMachineTypeID = rsCheck("machinetypeid")
|
||||
If Not IsNull(currentMachineTypeID) And currentMachineTypeID >= 33 Then
|
||||
isPC = True
|
||||
End If
|
||||
isPC = Not IsNull(rsCheck("pctypeid"))
|
||||
End If
|
||||
rsCheck.Close
|
||||
|
||||
|
||||
Reference in New Issue
Block a user