@@ -48,8 +48,9 @@ Class HomeController | |||||
blah.Preview = false | blah.Preview = false | ||||
blah.ShowProgress = false | blah.ShowProgress = false | ||||
blah.ShowPrintDialog = false | blah.ShowPrintDialog = false | ||||
blah.Filename = "F:\Development\Tracking_Kits\Data\Label_Report.rep" | |||||
blah.SaveToPdf "F:\Development\Tracking_Kits\Data\sample.pdf",1 | |||||
blah.Filename = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\Label_Report.rep" | |||||
blah.SetDatabaseConnectionString "TRACKINGKITLABELS","Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=C:\inetpub\Data\webdata - Copy.mdb;" | |||||
blah.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\sample.pdf",1 | |||||
End Sub | End Sub | ||||
End Class | End Class | ||||
@@ -65,6 +65,25 @@ | |||||
<td><% = H(KitLabels.MIDDLENAME) %></td> | <td><% = H(KitLabels.MIDDLENAME) %></td> | ||||
<td><% = H(KitLabels.SUFFIX) %></td> | <td><% = H(KitLabels.SUFFIX) %></td> | ||||
<td><% = H(KitLabels.PRECINCT) %></td> | <td><% = H(KitLabels.PRECINCT) %></td> | ||||
<td><% = H(KitLabels.ADDRESS1) %></td> | |||||
<td><% = H(KitLabels.ADDRESS2) %></td> | |||||
<td><% = H(KitLabels.ADDRESS3) %></td> | |||||
<td><% = H(KitLabels.ADDRESS4) %></td> | |||||
<td><% = H(KitLabels.ADDRESS5) %></td> | |||||
<td><% = H(KitLabels.APPSENT) %></td> | |||||
<td><% = H(KitLabels.APPRETURNED) %></td> | |||||
<td><% = H(KitLabels.BALSENT) %></td> | |||||
<td><% = H(KitLabels.BALRETURNED) %></td> | |||||
<td><% = H(KitLabels.CountingBoard) %></td> | |||||
<td><% = H(KitLabels.UOCAVASTATUS) %></td> | |||||
<td><% = H(KitLabels.EMAILADDRESS) %></td> | |||||
<td><% = H(KitLabels.PHONENUMBER) %></td> | |||||
<td><% = H(KitLabels.BALLOT_NUMBER) %></td> | |||||
<td><% = H(KitLabels.CassADDRESS1) %></td> | |||||
<td><% = H(KitLabels.CassADDRESS2) %></td> | |||||
<td><% = H(KitLabels.CassADDRESS3) %></td> | |||||
<td><% = H(KitLabels.CassADDRESS4) %></td> | |||||
<td><% = H(KitLabels.CassADDRESS5) %></td> | |||||
</tr> | </tr> | ||||
<% Wend %> | <% Wend %> | ||||
@@ -0,0 +1,37 @@ | |||||
[NEWLISTTEMPLATE-1] | |||||
SETTINGS="Automated_Purple_Envelopes" | |||||
FILENAME="\\Mm2012\apps\BCC\MM2010\Lists\tracking_Test.dbf" | |||||
OVERWRITE=Y | |||||
PARALLEL=N | |||||
[IMPORT-2] | |||||
LIST="\\Mm2012\apps\BCC\MM2010\Lists\tracking_Test.dbf" | |||||
SETTINGS="Tracking_CSV" | |||||
FILENAME="\\KCI-SYN-CL01\PC Transfer\TrackingDataExport\temp.csv" | |||||
PARALLEL=N | |||||
WAIT=DEFAULT | |||||
STARTTIME=DEFAULT | |||||
SUPPRESSERRORS=N | |||||
[ENCODE-3] | |||||
LIST="\\Mm2012\apps\BCC\MM2010\Lists\tracking_Test.dbf" | |||||
SELECTIVITY=NONE | |||||
ADDRESSGROUPS="MAIN" | |||||
SWAP=Y | |||||
STANDARDIZEADDRESS=Y | |||||
STANDARDIZECITY=Y | |||||
ABBREVIATECITY=N | |||||
IGNORENONUSPS=N | |||||
EXTENDEDMATCHING=N | |||||
CASE="UPPER" | |||||
FIRMASIS=Y | |||||
ZIP5CHECKDIGIT=N | |||||
SUMMARYPAGE=N | |||||
NDIREPORT=N | |||||
COPIES=0 | |||||
PARALLEL=N | |||||
WAIT=DEFAULT | |||||
STARTTIME=DEFAULT | |||||
SUPPRESSERRORS=Y | |||||
[EXPORT-6] | |||||
LIST="\\Mm2012\apps\BCC\MM2010\Lists\tracking_Test.dbf" | |||||
SETTINGS="Delimited: FROM_MM" | |||||
[TERMINATE-7] |
@@ -0,0 +1,110 @@ | |||||
Option Explicit | |||||
Dim dev:dev = True | |||||
Dim WshShell:Set WshShell = WScript.CreateObject("Wscript.Shell") | |||||
Dim fso:Set fso = WScript.CreateObject("Scripting.Filesystemobject") | |||||
Dim outFile | |||||
Dim DataDirectory | |||||
Dim ConnectionString | |||||
Dim oConn:Set oConn = WScript.CreateObject("ADODB.Connection") | |||||
Dim glob:set glob = CreateObject("Chilkat_9_5_0.Global") | |||||
Dim success:success = glob.UnlockBundle("KENTCM.CB1022025_RGzBPM5J655e") | |||||
If (success <> 1) Then | |||||
WriteLine(glob.LastErrorText) | |||||
WScript.Quit | |||||
End If | |||||
Dim objCSV:Set objCsv = CreateObject("Chilkat_9_5_0.Csv") | |||||
Dim WorkingDirectory:WorkingDirectory = Replace(WScript.ScriptFullName,WScript.ScriptName,"") | |||||
If dev Then | |||||
'set outFile = fso.CreateTextFile("F:\Development\Tracking_Kits\ImportService\temp.csv",True) | |||||
set outFile = fso.CreateTextFile("\\kci-syn-cl01\PC Transfer\TrackingDataExport\temp.csv",True) | |||||
DataDirectory = WorkingDirectory & "test" | |||||
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=F:\Development\Tracking_Kits\Data\webdata - Copy.mdb;" | |||||
Else | |||||
DataDirectory = "\\kci-syn-cl01\PC Transfer\TrackingDataImport\" | |||||
set outFile = fso.CreateTextFile("\\kci-syn-cl01\PC Transfer\TrackingDataExport\temp.csv",True) | |||||
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=C:\inetpub\Data\webdata - Copy.mdb;" | |||||
End If | |||||
oConn.ConnectionString = ConnectionString | |||||
oConn.Open | |||||
Dim KitID:KitID = CheckForJobsToCass() | |||||
If KitID > 0 Then | |||||
ExportMMCsv(KitID) | |||||
RunMailManager | |||||
ImportCass | |||||
End If | |||||
Sub ImportCass | |||||
Dim currentRow | |||||
objCsv.LoadFile("\\kci-syn-cl01\PC Transfer\TrackingDataExport\FROM_MM.CSV") | |||||
For currentRow = 0 To objCsv.NumRows -1 | |||||
oConn.Execute("UPDATE InkJetRecords SET CassADDRESS1 = '" & objCsv.GetCell(currentRow,1) & "', " &_ | |||||
"CassADDRESS2 = '" & objCSV.GetCell(currentRow,3) & "', " &_ | |||||
"CassADDRESS3 = '" & objCSV.GetCell(currentRow,4) & "', " &_ | |||||
"CassADDRESS4 = '" & objCSV.GetCell(currentRow,5) & "', " &_ | |||||
"CassADDRESS5 = '" & objCsv.GetCell(currentRow,6) & ", " & objCsv.GetCell(currentRow,7) & " " & objCsv.GetCell(currentRow,8) & "'" &_ | |||||
" WHERE ID = " & objCSV.GetCell(currentRow,0) & ";") | |||||
Next | |||||
oConn.Execute("UPDATE Kit SET Status ='Ready To Create Labels' WHERE ID =" & KitID & ";") | |||||
End Sub | |||||
Sub RunMailManager | |||||
WshShell.Run "\\MM2012\APPS\BCC\MM2010\mailman.exe -p -j MMJOB.mjb -u DAN",1,True | |||||
End Sub | |||||
Sub ExportMMCsv(KitId) | |||||
Dim success | |||||
objCsv.HasColumnNames = 1 | |||||
objCSV.EnableQuotes = 1 | |||||
success = objCsv.SetColumnName(0,"ID") | |||||
success = objCsv.SetColumnName(1,"NAME") | |||||
success = objCsv.SetColumnName(2,"ADDRESS1") | |||||
success = objCsv.SetColumnName(3,"ADDRESS2") | |||||
success = objCsv.SetColumnName(4,"ADDRESS3") | |||||
success = objCsv.SetColumnName(5,"ADDRESS4") | |||||
success = objCsv.SetColumnName(6,"ADDRESS5") | |||||
Dim rs : Set rs = oConn.Execute("Select ID," & _ | |||||
"IIF(FIRSTNAME IS NULL,'',FIRSTNAME & ' ') & " & _ | |||||
"IIF(MIDDLENAME IS NULL,'',MIDDLENAME & ' ') & " & _ | |||||
"IIF(LASTNAME IS NULL,'',LASTNAME & ' ') & " & _ | |||||
"IIF(SUFFIX IS NULL,'',SUFFIX & ' ') " & _ | |||||
"AS NAME, ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5 FROM InkjetRecords WHERE KitID =" & KitID & " ORDER By ID;") | |||||
Dim CurrentRow:CurrentRow = 0 | |||||
While Not rs.EOF | |||||
objCSV.SetCell CurrentRow,0,rs("ID").value | |||||
objCSV.SetCell CurrentRow,1,rs("NAME").value | |||||
objCSV.SetCell CurrentRow,2,rs("ADDRESS1").value | |||||
objCSV.SetCell CurrentRow,3,rs("ADDRESS2").value | |||||
objCSV.SetCell CurrentRow,4,rs("ADDRESS3").value | |||||
objCSV.SetCell CurrentRow,5,rs("ADDRESS4").value | |||||
objCSV.SetCell CurrentRow,6,rs("ADDRESS5").value | |||||
rs.MoveNext | |||||
CurrentRow = CurrentRow +1 | |||||
Wend | |||||
Dim CsvString:CsvString = objCSV.SaveToString() | |||||
outFile.WriteLine CsvString | |||||
outFile.Close | |||||
End Sub | |||||
Function CheckForJobsToCass() | |||||
Dim rs : set rs = oConn.Execute("Select TOP 1 ID from Kit Where Status ='Ready to Cass' ORDER BY ID DESC;") | |||||
If Not rs.EOF Then | |||||
Dim kitId : kitId = rs("ID").value | |||||
rs.Close | |||||
CheckForJobsToCass = KitID | |||||
oConn.Execute("UPDATE Kit SET Status ='Cassing' WHERE ID =" & KitID & ";") | |||||
Else | |||||
CheckForJobsToCass = 0 | |||||
End If | |||||
End Function | |||||
@@ -73,37 +73,12 @@ Dim JCode:JCode = Left(Filename,5) | |||||
Dim oConn:Set oConn = WScript.CreateObject("ADODB.Connection") | Dim oConn:Set oConn = WScript.CreateObject("ADODB.Connection") | ||||
oConn.ConnectionString = ConnectionString | oConn.ConnectionString = ConnectionString | ||||
oConn.Open | oConn.Open | ||||
oConn.Execute("Insert Into Kit ([JobNumber], [Jcode], [CreatedOn], [JobType]) VALUES ('" & JobNumber & "','" & JCode & "',#" & Now() & "#,'Purple Envelopes');") | |||||
oConn.Execute("Insert Into Kit ([JobNumber], [Jcode], [CreatedOn], [JobType],[Filename],[Status]) VALUES ('" & JobNumber & "','" & JCode & "',#" & Now() & "#,'Purple Envelopes','" & FileName & "','Importing');") | |||||
Dim rs : set rs = oConn.Execute("Select TOP 1 ID from Kit ORDER BY ID DESC") | Dim rs : set rs = oConn.Execute("Select TOP 1 ID from Kit ORDER BY ID DESC") | ||||
Dim kitId : kitId = rs("ID").value | Dim kitId : kitId = rs("ID").value | ||||
rs.close | rs.close | ||||
'objCsv.LoadFromString(CsvString) | |||||
Dim i | Dim i | ||||
For i = 1 To objCSV.NumRows | |||||
'debug.WriteLine objCsv.GetCell(i,0) | |||||
' debug.WriteLine("Insert Into [InkjetRecords] (KitID,VOTERID,LASTNAME,FIRSTNAME,MIDDLENAME" & _ | |||||
' ",SUFFIX,PRECINCT,ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,APPSENT,APPRETURNED,BALSENT,BALRETURNED" & _ | |||||
' ",CountingBoard,UOCAVASTATUS,EMAILADDRESS,PHONENUMBER,BALLOT_NUMBER) VALUES (" & CInt(kitId) & ",'" & objCsv.GetCell(i,0) & _ | |||||
' "','" & objCSV.GetCell(i,1) & _ | |||||
' "','" & objCsv.GetCell(i,2) & _ | |||||
' "','" & objCsv.GetCell(i,3) & _ | |||||
' "','" & objCsv.GetCell(i,4) & _ | |||||
' "','" & objCsv.GetCell(i,5) & _ | |||||
' "','" & objCsv.GetCell(i,6) & _ | |||||
' "','" & objCsv.GetCell(i,7) & _ | |||||
' "','" & objCsv.GetCell(i,8) & _ | |||||
' "','" & objCsv.GetCell(i,9) & _ | |||||
' "','" & objCsv.GetCell(i,10) & _ | |||||
' "','" & objCsv.GetCell(i,11) & _ | |||||
' "','" & objCsv.GetCell(i,12) & _ | |||||
' "','" & objCsv.GetCell(i,13) & _ | |||||
' "','" & objCsv.GetCell(i,14) & _ | |||||
' "','" & objCsv.GetCell(i,15) & _ | |||||
' "','" & objCsv.GetCell(i,16) & _ | |||||
' "','" & objCsv.GetCell(i,17) & _ | |||||
' "','" & objCsv.GetCell(i,18) & _ | |||||
' "','" & objCsv.GetCell(i,19) & _ | |||||
' "')") | |||||
For i = 1 To objCSV.NumRows -1 | |||||
oConn.Execute("Insert Into [InkjetRecords] (KitID,VOTERID,LASTNAME,FIRSTNAME,MIDDLENAME" & _ | oConn.Execute("Insert Into [InkjetRecords] (KitID,VOTERID,LASTNAME,FIRSTNAME,MIDDLENAME" & _ | ||||
",SUFFIX,PRECINCT,ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,APPSENT,APPRETURNED,BALSENT,BALRETURNED" & _ | ",SUFFIX,PRECINCT,ADDRESS1,ADDRESS2,ADDRESS3,ADDRESS4,ADDRESS5,APPSENT,APPRETURNED,BALSENT,BALRETURNED" & _ | ||||
",CountingBoard,UOCAVASTATUS,EMAILADDRESS,PHONENUMBER,BALLOT_NUMBER) VALUES (" & kitId & _ | ",CountingBoard,UOCAVASTATUS,EMAILADDRESS,PHONENUMBER,BALLOT_NUMBER) VALUES (" & kitId & _ | ||||
@@ -129,6 +104,7 @@ Dim JCode:JCode = Left(Filename,5) | |||||
"','" & objCsv.GetCell(i,19) & _ | "','" & objCsv.GetCell(i,19) & _ | ||||
"')") | "')") | ||||
Next | Next | ||||
oConn.Execute("Update Kit SET [Status] = 'Ready to Cass' Where ID = " & kitId &";") | |||||
oConn.Close | oConn.Close | ||||
End If | End If | ||||
End If | End If | ||||
@@ -1,9 +1,10 @@ | |||||
X Add links in the data base foreign keys | X Add links in the data base foreign keys | ||||
X add purple enevlope field in kits to identify them | X add purple enevlope field in kits to identify them | ||||
update insert statements to reflect this change | |||||
add purple kit contorlloers | |||||
view purple kits option on switch board | |||||
X update insert statements to reflect this change | |||||
X add purple kit contorlloers | |||||
X view purple kits option on switch board | |||||
X Add filename and cass bool to kit table to keep track of what is going on | |||||
create a list and import and export and process to cass and pave | |||||
cicd turn off application pool and site before unzipping then restart app and site | cicd turn off application pool and site before unzipping then restart app and site | ||||
cicd install service and start | cicd install service and start | ||||
cicd stop service and copy zip to folder | cicd stop service and copy zip to folder | ||||
Powered by TurnKey Linux.