diff --git a/editpc.asp b/editpc.asp
index bc7c8f7..b76e4ec 100644
--- a/editpc.asp
+++ b/editpc.asp
@@ -54,7 +54,7 @@
End If
' Store machine data
- Dim serialnumber, hostname, machinenumber, modelid, businessunitid, alias, machinenotes, mapleft, maptop, pcMachineTypeId, currentMachineStatusId
+ Dim serialnumber, hostname, machinenumber, modelid, businessunitid, alias, machinenotes, mapleft, maptop, pcMachineTypeId, currentMachineStatusId, currentPcTypeId
serialnumber = "" : If NOT IsNull(rsMachine("serialnumber")) Then serialnumber = rsMachine("serialnumber") & ""
hostname = "" : If NOT IsNull(rsMachine("hostname")) Then hostname = rsMachine("hostname") & ""
machinenumber = "" : If NOT IsNull(rsMachine("machinenumber")) Then machinenumber = rsMachine("machinenumber") & ""
@@ -65,6 +65,7 @@
mapleft = "" : If NOT IsNull(rsMachine("mapleft")) Then mapleft = rsMachine("mapleft")
maptop = "" : If NOT IsNull(rsMachine("maptop")) Then maptop = rsMachine("maptop")
pcMachineTypeId = 0 : If NOT IsNull(rsMachine("pcmachinetypeid")) Then pcMachineTypeId = CLng(rsMachine("pcmachinetypeid"))
+ currentPcTypeId = 0 : If NOT IsNull(rsMachine("pctypeid")) Then currentPcTypeId = CLng(rsMachine("pctypeid"))
currentMachineStatusId = "" : If NOT IsNull(rsMachine("machinestatusid")) Then currentMachineStatusId = rsMachine("machinestatusid")
rsMachine.Close
@@ -587,19 +588,32 @@ Set rsMachineStatus = Nothing
<%
' Show filter info for specialized PCs
- If pcMachineTypeId = 41 Then
- Response.Write(" Filtered to CMM equipment only")
- ElseIf pcMachineTypeId = 42 Then
- Response.Write(" Filtered to Wax Trace equipment only")
- ElseIf pcMachineTypeId = 43 Then
- Response.Write(" Filtered to Measuring Machine equipment only")
+ If filterDescription <> "" Then
+ Response.Write(" Filtered to " & filterDescription & " equipment only")
Else
Response.Write("Select a machine that this PC controls")
End If
diff --git a/sql/add_genspect_machinetype.sql b/sql/add_genspect_machinetype.sql
new file mode 100644
index 0000000..a7a0634
--- /dev/null
+++ b/sql/add_genspect_machinetype.sql
@@ -0,0 +1,15 @@
+-- Add Genspect/EAS1000 equipment type
+-- Run on production database
+-- Date: 2025-12-09
+
+-- Check if Genspect machinetype already exists
+SET @genspect_exists = (SELECT COUNT(*) FROM machinetypes WHERE machinetype = 'Genspect');
+
+-- Insert only if it doesn't exist
+INSERT INTO machinetypes (machinetype, isactive)
+SELECT 'Genspect', 1
+FROM dual
+WHERE @genspect_exists = 0;
+
+-- Show result
+SELECT machinetypeid, machinetype FROM machinetypes WHERE machinetype = 'Genspect';