diff --git a/App/Controllers/Kit/KitController.asp b/App/Controllers/Kit/KitController.asp index c280521..ca8269c 100644 --- a/App/Controllers/Kit/KitController.asp +++ b/App/Controllers/Kit/KitController.asp @@ -113,7 +113,27 @@ Class KitController HTMLSecurity.SetAntiCSRFToken "KitEditForm" %> <% End Sub + Public Sub DownloadTrackingkitSnailWorks + + dim id : id = Request.QueryString("Id") + dim Labels : Set Labels = KitLabelsRepository.Find(Array("KitID=?",id),empty) + + + 'Response.Buffer = False + Dim objStream:Set objStream = Server.CreateObject("ADODB.Stream") + objStream.Type = 1 'adTypeBinary + objStream.Open + objStream.LoadFromFile(server.mappath("/uploads/MI Jurisdictions with IMB.csv")) + 'Response.Flush + Response.ContentType = "application/octet-stream" + Response.Addheader "Content-Disposition", "attachment; filename=" & "MI Jurisdictions with IMB.csv" + Response.BinaryWrite objStream.Read + 'Response.End + objStream.Close + Set objStream = Nothing + + End Sub Public Sub Edit dim id : id = Request.QueryString("Id") diff --git a/App/Views/Kit/SwitchBoardEdit.asp b/App/Views/Kit/SwitchBoardEdit.asp index 911d978..6879662 100644 --- a/App/Views/Kit/SwitchBoardEdit.asp +++ b/App/Views/Kit/SwitchBoardEdit.asp @@ -2,6 +2,7 @@ <%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("KitEditForm")) %> <%= HTML.Hidden("Id", Model.Kit.ID) %>
+

Job Number: <%= Model.Kit.JobNumber %>

Jurisdiction: <%= Model.Kit.Jurisdiction %>

@@ -9,6 +10,8 @@

Created On: <%= Model.Kit.CreatedOn %>

Labels Printed On : <%= Model.Kit.LabelsPrinted %>

Exported to SnailWorks On: <%= Model.Kit.ExportedToSnailWorks %>

+ <%= HTML.LinkToExt("Download SnailWorks File","Kit", "DownloadTrackingkitSnailWorks", Array("Id",Model.Kit.ID,"_P","1"),Array("class","btn btn-primary")) %> +
diff --git a/ImportService/TrackingDataImport.vbs b/ImportService/TrackingDataImport.vbs index 36292b3..b7f3898 100644 --- a/ImportService/TrackingDataImport.vbs +++ b/ImportService/TrackingDataImport.vbs @@ -75,10 +75,10 @@ Function ExportInkjetFile(KitID) objInkjetCSV.EnableQuotes = 1 objInkjetCSV.SetColumnName 0,"Full Name" - objInkjetCSV.SetColumnName 1,"Company" - objInkjetCSV.SetColumnName 2,"Alternate 1 Address" - objInkjetCSV.SetColumnName 3,"Delivery Address" - objInkjetCSV.SetColumnName 4,"City St ZIP+4" + objInkjetCSV.SetColumnName 1,"Address 1" + objInkjetCSV.SetColumnName 2,"Address 2" + objInkjetCSV.SetColumnName 3,"Address 3" + objInkjetCSV.SetColumnName 4,"Address 4" objInkjetCSV.SetColumnName 5,"IM barcode Characters" objInkjetCSV.SetColumnName 6,"Precinct" objInkjetCSV.SetColumnName 7,"Ballot ID" @@ -86,33 +86,31 @@ Function ExportInkjetFile(KitID) objInkjetCSV.SetColumnName 9,"Jurisdiction code" objInkjetCSV.SetColumnName 10,"Election Date" objInkJetCSV.SetColumnName 11,"Combined Pct_Ballot Num" - objInkJetCSV.SetColumnName 12,"2D Matrix Barcode" - objInkJetCSV.SetColumnName 13,"Title" - objInkJetCSV.SetColumnName 14,"G2 Full Name" - objInkJetCSV.SetColumnName 15,"G2 Company" - objInkJetCSV.SetColumnName 16,"G2 Alternate 1 Address" - objInkJetCSV.SetColumnName 17,"G2 Delivery Address" - objInkJetCSV.SetColumnName 18,"G2 City St ZIP+4" - objInkJetCSV.SetColumnName 19,"G2 IM barcode Characters" - objInkJetCSV.SetColumnName 20,"Matching Code" + objInkJetCSV.SetColumnName 12,"Title" + objInkJetCSV.SetColumnName 13,"G2 Full Name" + objInkJetCSV.SetColumnName 14,"G2 Company" + objInkJetCSV.SetColumnName 15,"G2 Alternate 1 Address" + objInkJetCSV.SetColumnName 16,"G2 Delivery Address" + objInkJetCSV.SetColumnName 17,"G2 City St ZIP+4" + objInkJetCSV.SetColumnName 18,"G2 IM barcode Characters" + objInkJetCSV.SetColumnName 19,"Matching Code" Dim AddressArray Dim row:row = 0 While Not KitLabelsRs.EOF AddressArray = CompressArray(Array(KitLabelsRs("CassADDRESS1").Value,KitLabelsRs("CassADDRESS2").Value,KitLabelsRs("CassADDRESS3").Value,KitLabelsRs("CassADDRESS4").Value,KitLabelsRs("CassADDRESS5").Value)) objInkjetCSV.SetCellByName row,"Full Name",AddressArray(0) - objInkjetCSV.SetCellByName row,"Company",AddressArray(1) - objInkjetCSV.SetCellByName row,"Alternate 1 Address",AddressArray(2) - objInkjetCSV.SetCellByName row,"Delivery Address",AddressArray(3) - objInkjetCSV.SetCellByName row,"City St ZIP+4",AddressArray(4) + objInkjetCSV.SetCellByName row,"Address 1",AddressArray(1) + objInkjetCSV.SetCellByName row,"Address 2",AddressArray(2) + objInkjetCSV.SetCellByName row,"Address 3",AddressArray(3) + objInkjetCSV.SetCellByName row,"Address 4",AddressArray(4) objInkJetCSV.SetCellByName row,"IM barcode Characters",KitLabelsRs("OutboundIMBDigits").Value objInkJetCSV.SetCellByName row,"Precinct",KitLabelsRs("PRECINCT").Value objInkJetCSV.SetCellByName row,"Ballot ID",KitLabelsRs("VOTERID").Value objInkJetCSV.SetCellByName row,"Ballot Number",TrimLeadingZeros(KitLabelsRs("BALLOT_NUMBER").Value) objInkJetCSV.SetCellByName row,"Jurisdiction code",KitRs("Jcode").Value objInkJetCSV.SetCellByName row,"Election Date",ElectionDate - objInkJetCSV.SetCellByName row,"Combined Pct_Ballot Num",KitLabelsRs("PRECINCT").Value & TrimLeadingZeros(KitLabelsRs("BALLOT_NUMBER").Value - objInkJetCSV.SetCellByName row,"2D Matrix Barcode",KitRs("Jcode").Value & KitLabelsRs("BALLOT_NUMBER").Value + objInkJetCSV.SetCellByName row,"Combined Pct_Ballot Num",KitLabelsRs("PRECINCT").Value & TrimLeadingZeros(KitLabelsRs("BALLOT_NUMBER").Value) objInkjetCSV.SetCellByName row,"Title",ContactRs("Title").Value objInkJetCSV.SetCellByName row,"G2 Full Name",JurisdictionRs("Name").Value objInkJetCSV.SetCellByName row,"G2 Company",JurisdictionRs("Mailing_Address").Value