From 0a66434f0a15342752fcea47b8822ffbd57150be Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Tue, 21 May 2024 13:25:40 -0400 Subject: [PATCH] cleanuo --- ...on_16_Alter_Jurisdiction_Table_With_Title.asp | 16 ++++++++++++++++ Data/Migrations/migrate.asp | 1 + ImportService/TrackingDataImport.vbs | 5 +++-- 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Data/Migrations/Migration_16_Alter_Jurisdiction_Table_With_Title.asp diff --git a/Data/Migrations/Migration_16_Alter_Jurisdiction_Table_With_Title.asp b/Data/Migrations/Migration_16_Alter_Jurisdiction_Table_With_Title.asp new file mode 100644 index 0000000..73c009b --- /dev/null +++ b/Data/Migrations/Migration_16_Alter_Jurisdiction_Table_With_Title.asp @@ -0,0 +1,16 @@ +<% +Class Migration_16_Alter_InkJetRecords_Table_With_Title + Public Migration + + Public Sub Up + Migration.Do "ALTER TABLE [Jurisdiction] " &_ + "ADD [Title] VARCHAR(50);" +End Sub + + Public Sub Down + Migration.Do "ALTER TABLE [Jurisdiction] " &_ + "DROP COLUMN [Title];" + End Sub +End Class + Migrations.Add "Migration_16_Alter_InkJetRecords_Table_With_Title" + %> \ No newline at end of file diff --git a/Data/Migrations/migrate.asp b/Data/Migrations/migrate.asp index ec30525..4b671c5 100644 --- a/Data/Migrations/migrate.asp +++ b/Data/Migrations/migrate.asp @@ -44,6 +44,7 @@ Migrations.Tracing = false + <% Sub HandleMigration putl "Starting Version: " & Migrations.Version & "" diff --git a/ImportService/TrackingDataImport.vbs b/ImportService/TrackingDataImport.vbs index 9cb7203..f388378 100644 --- a/ImportService/TrackingDataImport.vbs +++ b/ImportService/TrackingDataImport.vbs @@ -310,17 +310,18 @@ Dim serialStart:serialStart = CLng(GetSetting("SerialNumberStart")) + CLng(GetSe Dim Counter:Counter=0 Dim KitLabelID Dim KitLabelRs +Dim Mid:Mid = GetSetting("MailingID") Dim Step : If KitRs("InboundSTID") <> "" Then : Step = 2 : Else Step = 1 serialStart = PadLeft(serialStart + CLng(Counter),9,"0") While Not InkjetRs.EOF If Step = 1 Then oConn.Execute("INSERT INTO KitLabels (KitID,OutboundSerial,OutboundIMBDigits) " &_ - "VALUES(" & KitID & ",'" & serialStart & "','" & KitRs("OutBoundSTID").Value & serialStart & "000000000" & "');") + "VALUES(" & KitID & ",'" & serialStart & "','" & KitRs("OutBoundSTID").Value & Mid & serialStart & "000000000" & "');") Else oConn.Execute "INSERT INTO KitLabels (KitID,OutboundSerial,InBoundSerial,OutboundIMBDigits,InBoundIMBDigits) " &_ - "VALUES(" & KitID & ",'" & serialStart & "','" & serialStart + 1 & "','" & KitRs("OutBoundSTID").Value & serialStart & "000000000" & "','" & KitRs("InboundSTID").Value & serialStart + 1 & Jcode & "');" + "VALUES(" & KitID & ",'" & serialStart & "','" & serialStart + 1 & "','" & KitRs("OutBoundSTID").Value & Mid & serialStart & "000000000" & "','" & KitRs("InboundSTID").Value & serialStart + 1 & Jcode & "');" End If Set KitLabelRs = oConn.Execute("SELECT TOP 1 [ID] FROM KitLabels ORDER BY ID DESC"):KitLabelID = KitLabelRs("ID").Value