purple_envelopes
do větve master
před před 7 měsíci
@@ -0,0 +1,129 @@ | |||
<% Option Explicit %> | |||
<!--#include file="../../include_all.asp"--> | |||
<!--#include file="../../ViewModels/InkjetRecordsViewModels.asp"--> | |||
<% | |||
Class InkjetRecordsController | |||
Public Model | |||
Public Sub Index | |||
dim page_size : page_size = 10 | |||
dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1) | |||
dim page_count, record_count | |||
set Model = new PagedIndex_ViewModel_Class | |||
Model.Title = "InkjetRecords" | |||
set Model.InkjetRecords = InkjetRecordsRepository.FindPaged(empty, "ID", page_size, page_num, page_count, record_count) | |||
Model.CurrentPageNumber = page_num | |||
Model.PageSize = page_size | |||
Model.PageCount = page_count | |||
Model.RecordCount = record_count | |||
%> <!--#include file="../../Views/InkjetRecords/Index.asp"--> <% | |||
End Sub | |||
Public Sub Search | |||
dim searchValue:searchValue = Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q")) | |||
dim page_size : page_size = 10 | |||
dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1) | |||
dim page_count, record_count | |||
set Model = new PagedIndex_ViewModel_Class | |||
Model.Title = "InkjetRecords" | |||
set Model.InkjetRecords = InkjetRecordsRepository.SearchTablePaged(Array("ID","%" & searchValue & "%","KitID","%" & searchValue & "%","VOTERID","%" & searchValue & "%","LASTNAME","%" & searchValue & "%","FIRSTNAME","%" & searchValue & "%","MIDDLENAME","%" & searchValue & "%","SUFFIX","%" & searchValue & "%","PRECINCT","%" & searchValue & "%","ADDRESS1","%" & searchValue & "%","ADDRESS2","%" & searchValue & "%","ADDRESS3","%" & searchValue & "%","ADDRESS4","%" & searchValue & "%","ADDRESS5","%" & searchValue & "%","APPSENT","%" & searchValue & "%","APPRETURNED","%" & searchValue & "%","BALSENT","%" & searchValue & "%","BALRETURNED","%" & searchValue & "%","CountingBoard","%" & searchValue & "%","UOCAVASTATUS","%" & searchValue & "%","EMAILADDRESS","%" & searchValue & "%","PHONENUMBER","%" & searchValue & "%","BALLOT_NUMBER","%" & searchValue & "%","CassADDRESS1","%" & searchValue & "%","CassADDRESS2","%" & searchValue & "%","CassADDRESS3","%" & searchValue & "%","CassADDRESS4","%" & searchValue & "%","CassADDRESS5","%" & searchValue & "%"),"ID", page_size, page_num, page_count, record_count) | |||
Model.CurrentPageNumber = page_num | |||
Model.PageSize = page_size | |||
Model.PageCount = page_count | |||
Model.RecordCount = record_count | |||
%> <!--#include file="../../Views/InkjetRecords/Index.asp"--> <% | |||
End Sub | |||
Public Sub Edit | |||
dim id : id = Request.QueryString("Id") | |||
set Model = new Edit_ViewModel_Class | |||
set Model.InkjetRecords = InkjetRecordsRepository.FindByID(id) | |||
Model.Title = "Edit InkjetRecords" | |||
HTMLSecurity.SetAntiCSRFToken "InkjetRecordsEditForm" | |||
%> <!--#include file="../../Views/InkjetRecords/Edit.asp"--> <% | |||
Flash.Success = "InkjetRecords Updated." | |||
End Sub | |||
Public Sub EditPost | |||
MVC.RequirePost | |||
HTMLSecurity.OnInvalidAntiCsrfTokenRedirectToActionExt "InkjetRecordsEditForm", Request.Form("nonce"), "Edit", Array("Id", Request.Form("Id")) | |||
dim ID : ID = Request.Form("Id") | |||
dim model : set model = InkjetRecordsRepository.FindByID(ID) | |||
set model = Automapper.AutoMap(Request.Form, model) | |||
'model.Validate | |||
'If model.Validator.HasErrors then | |||
FormCache.SerializeForm "EditInkjetRecords", Request.Form | |||
' Flash.Errors = model.Validator.Errors | |||
' MVC.RedirectToActionExt "Edit", Array("Id",ID) | |||
'Else | |||
InkjetRecordsRepository.Update model | |||
FormCache.ClearForm "EditInkjetRecords" | |||
Flash.Success = "InkjetRecords updated." | |||
MVC.RedirectToAction "Index" | |||
'End If | |||
End Sub | |||
Public Sub Create | |||
dim form_params : set form_params = FormCache.DeserializeForm("NewInkjetRecords") | |||
If Not form_params Is Nothing then | |||
set Model = Automapper.AutoMap(form_params, New Create_ViewModel_Class) | |||
Else | |||
set Model = new Create_ViewModel_Class | |||
End If | |||
HTMLSecurity.SetAntiCSRFToken "InkjetRecordsCreateForm" | |||
%> <!--#include file="../../Views/InkjetRecords/Create.asp"--> <% | |||
End Sub | |||
Public Sub CreatePost | |||
MVC.RequirePost | |||
HtmlSecurity.OnInvalidAntiCSRFTokenRedirectToAction "InkjetRecordsCreateForm", Request.Form("nonce"), "Create" | |||
dim new_InkjetRecords_model : set new_InkjetRecords_model = Automapper.AutoMap(Request.Form, new InkjetRecordsModel_Class) | |||
'new_InkjetRecords_model.Validator.Validate | |||
'If new_InkjetRecords_model.Validator.HasErrors then | |||
' FormCache.SerializeForm "NewInkjetRecords", Request.Form | |||
' Flash.Errors = new_InkjetRecords_model.Validator.Errors | |||
' MVC.RedirectToAction "Create" | |||
'Else | |||
InkjetRecordsRepository.AddNew new_InkjetRecords_model | |||
' FormCache.ClearForm "NewInkjetRecords" | |||
Flash.Success = "InkjetRecords added." | |||
MVC.RedirectToAction "Index" | |||
'End If | |||
End Sub | |||
Public Sub Delete | |||
dim id : id = Request.QueryString("Id") | |||
set Model = new Delete_ViewModel_Class | |||
set Model.InkjetRecords = InkjetRecordsRepository.FindByID(id) | |||
Model.Title = "Delete InkjetRecords" | |||
HTMLSecurity.SetAntiCSRFToken "InkjetRecordsDeleteForm" | |||
%> <!--#include file="../../Views/InkjetRecords/Delete.asp"--> <% | |||
End Sub | |||
Public Sub DeletePost | |||
MVC.RequirePost | |||
HtmlSecurity.OnInvalidAntiCSRFTokenRedirectToAction "InkjetRecordsDeleteForm", Request.Form("nonce"), "Create" | |||
dim id : id = Request.Form("Id") | |||
InkjetRecordsRepository.Delete id | |||
Flash.Success = "InkjetRecords deleted." | |||
MVC.RedirectToAction "Index" | |||
End Sub | |||
End Class | |||
MVC.Dispatch | |||
%> |
@@ -17,8 +17,23 @@ Class KitController | |||
Model.PageCount = page_count | |||
Model.RecordCount = record_count | |||
%> <!--#include file="../../Views/Kit/SwitchBoardIndex.asp"--> <% | |||
End Sub | |||
Public Sub SwitchBoardPurpleEnvelopsIndex | |||
dim page_size : page_size = 10 | |||
dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1) | |||
dim page_count, record_count | |||
set Model = new SwitchBoard_PurpleEnvelopesViewModel_Class | |||
Model.Title = "Tracking Kits" | |||
set Model.Kit = KitRepository.PagedPurpleEnvelopsIndexView(page_size, page_num, page_count, record_count) | |||
Model.CurrentPageNumber = page_num | |||
Model.PageSize = page_size | |||
Model.PageCount = page_count | |||
Model.RecordCount = record_count | |||
%> <!--#include file="../../Views/Kit/SwitchBoardIndex.asp"--> <% | |||
End Sub | |||
Public Sub Index | |||
dim page_size : page_size = 10 | |||
@@ -0,0 +1,342 @@ | |||
<% | |||
'======================================================================================================================= | |||
' InkjetRecords Model | |||
'======================================================================================================================= | |||
Class InkjetRecordsModel_Class | |||
Public Validator | |||
Public Class_Get_Properties | |||
Public ID '90 | |||
Public KitID '122 | |||
Public VOTERID '106 | |||
Public LASTNAME '106 | |||
Public FIRSTNAME '106 | |||
Public MIDDLENAME '106 | |||
Public SUFFIX '106 | |||
Public PRECINCT '106 | |||
Public ADDRESS1 '106 | |||
Public ADDRESS2 '106 | |||
Public ADDRESS3 '106 | |||
Public ADDRESS4 '106 | |||
Public ADDRESS5 '106 | |||
Public APPSENT '106 | |||
Public APPRETURNED '106 | |||
Public BALSENT '106 | |||
Public BALRETURNED '106 | |||
Public CountingBoard '106 | |||
Public UOCAVASTATUS '106 | |||
Public EMAILADDRESS '106 | |||
Public PHONENUMBER '106 | |||
Public BALLOT_NUMBER '106 | |||
Public CassADDRESS1 '106 | |||
Public CassADDRESS2 '106 | |||
Public CassADDRESS3 '106 | |||
Public CassADDRESS4 '106 | |||
Public CassADDRESS5 '106 | |||
Private Sub Class_Initialize | |||
'ValidateExitsts Me, "","" | |||
Class_Get_Properties = Array("ID, KitID, VOTERID, LASTNAME, FIRSTNAME, MIDDLENAME, SUFFIX, PRECINCT, ADDRESS1, ADDRESS2, ADDRESS3, ADDRESS4, ADDRESS5, APPSENT, APPRETURNED, BALSENT, BALRETURNED, CountingBoard, UOCAVASTATUS, EMAILADDRESS, PHONENUMBER, BALLOT_NUMBER, CassADDRESS1, CassADDRESS2, CassADDRESS3, CassADDRESS4, CassADDRESS5") | |||
End Sub | |||
End CLass | |||
'======================================================================================================================= | |||
' InkjetRecords Repository | |||
'======================================================================================================================= | |||
Class InkjetRecordsRepository_Class | |||
Public Function FindByID(ID) | |||
dim sql : sql = "Select [ID], [KitID], [VOTERID], [LASTNAME], [FIRSTNAME], [MIDDLENAME], [SUFFIX], [PRECINCT], [ADDRESS1], [ADDRESS2], [ADDRESS3], [ADDRESS4], [ADDRESS5], [APPSENT], [APPRETURNED], [BALSENT], [BALRETURNED], [CountingBoard], [UOCAVASTATUS], [EMAILADDRESS], [PHONENUMBER], [BALLOT_NUMBER], [CassADDRESS1], [CassADDRESS2], [CassADDRESS3], [CassADDRESS4], [CassADDRESS5] FROM [InkjetRecords] WHERE ID = ?" | |||
dim rs : set rs = DAL.Query(sql,ID) | |||
If rs.EOF then | |||
Err.Raise 1, "InkjetRecordsRepository_Class", InkjetRecordsNotFoundException("ID", ID) | |||
Else | |||
set FindByID = Automapper.AutoMap(rs,"InkjetRecordsModel_Class") | |||
End If | |||
End Function | |||
Public Function GetAll(orderBy) | |||
set GetAll = Find(empty,orderBy) | |||
End Function | |||
Public Function Find(where_kvarray, order_string_or_array) | |||
dim sql : sql = "Select [ID], [KitID], [VOTERID], [LASTNAME], [FIRSTNAME], [MIDDLENAME], [SUFFIX], [PRECINCT], [ADDRESS1], [ADDRESS2], [ADDRESS3], [ADDRESS4], [ADDRESS5], [APPSENT], [APPRETURNED], [BALSENT], [BALRETURNED], [CountingBoard], [UOCAVASTATUS], [EMAILADDRESS], [PHONENUMBER], [BALLOT_NUMBER], [CassADDRESS1], [CassADDRESS2], [CassADDRESS3], [CassADDRESS4], [CassADDRESS5] FROM [InkjetRecords]" | |||
If Not IsEmpty(where_kvarray) then | |||
sql = sql & " WHERE " | |||
dim where_keys, where_values | |||
KVUnzip where_kvarray, where_keys, where_values | |||
dim i | |||
For i = 0 to UBound(where_keys) | |||
If i > 0 then sql = sql & " AND " | |||
sql = sql & " " & where_keys(i) & " " | |||
Next | |||
End If | |||
If Not IsEmpty(order_string_or_array) then | |||
sql = sql & "ORDER BY " | |||
If IsArray(order_string_or_array) then | |||
dim order_array : order_array = order_string_or_array | |||
For i = 0 to UBound(order_array) | |||
If i > 0 then sql = sql & ", " | |||
sql = sql & " " & order_array(i) | |||
Next | |||
Else | |||
sql = sql & order_string_or_array & " " | |||
End If | |||
End If | |||
dim rs : set rs = DAL.Query(sql, where_values) | |||
set Find = InkjetRecordsList(rs) | |||
Destroy rs | |||
End Function | |||
Public Function FindPaged(where_kvarray, order_string_or_array, per_page, page_num, ByRef page_count, ByRef record_count) | |||
dim sql : sql = "Select [ID], [KitID], [VOTERID], [LASTNAME], [FIRSTNAME], [MIDDLENAME], [SUFFIX], [PRECINCT], [ADDRESS1], [ADDRESS2], [ADDRESS3], [ADDRESS4], [ADDRESS5], [APPSENT], [APPRETURNED], [BALSENT], [BALRETURNED], [CountingBoard], [UOCAVASTATUS], [EMAILADDRESS], [PHONENUMBER], [BALLOT_NUMBER], [CassADDRESS1], [CassADDRESS2], [CassADDRESS3], [CassADDRESS4], [CassADDRESS5] FROM [InkjetRecords]" | |||
If Not IsEmpty(where_kvarray) then | |||
sql = sql & " WHERE " | |||
dim where_keys, where_values | |||
KVUnzip where_kvarray, where_keys, where_values | |||
dim i | |||
For i = 0 to UBound(where_keys) | |||
If i > 0 then sql = sql & " AND " | |||
sql = sql & " " & where_keys(i) & " " | |||
Next | |||
End If | |||
If Not IsEmpty(order_string_or_array) then | |||
sql = sql & "ORDER BY " | |||
If IsArray(order_string_or_array) then | |||
dim order_array : order_array = order_string_or_array | |||
For i = 0 to UBound(order_array) | |||
If i > 0 then sql = sql & ", " | |||
sql = sql & " " & order_array(i) | |||
Next | |||
Else | |||
sql = sql & order_string_or_array & " " | |||
End If | |||
End If | |||
dim list : set list = new LinkedList_Class | |||
dim rs : set rs = DAL.PagedQuery(sql, where_values, per_page, page_num) | |||
If Not rs.EOF and Not (IsEmpty(per_page) and IsEmpty(page_num) and IsEmpty(page_count) and IsEmpty(record_count)) then | |||
rs.PageSize = per_page | |||
rs.AbsolutePage = page_num | |||
page_count = rs.PageCount | |||
record_count = rs.RecordCount | |||
End If | |||
set FindPaged = PagedInkjetRecordsList(rs, per_page) | |||
Destroy rs | |||
End Function | |||
Public Function SearchTablePaged(where_kvarray, order_string_or_array, per_page, page_num, ByRef page_count, ByRef record_count) | |||
dim sql : sql = "Select [ID], [KitID], [VOTERID], [LASTNAME], [FIRSTNAME], [MIDDLENAME], [SUFFIX], [PRECINCT], [ADDRESS1], [ADDRESS2], [ADDRESS3], [ADDRESS4], [ADDRESS5], [APPSENT], [APPRETURNED], [BALSENT], [BALRETURNED], [CountingBoard], [UOCAVASTATUS], [EMAILADDRESS], [PHONENUMBER], [BALLOT_NUMBER], [CassADDRESS1], [CassADDRESS2], [CassADDRESS3], [CassADDRESS4], [CassADDRESS5] FROM [InkjetRecords]" | |||
If Not IsEmpty(where_kvarray) then | |||
sql = sql & " WHERE " | |||
dim where_keys, where_values | |||
KVUnzip where_kvarray, where_keys, where_values | |||
dim i | |||
For i = 0 to UBound(where_keys) | |||
If i > 0 then sql = sql & " OR" | |||
sql = sql & " " & where_keys(i) & " LIKE ?" | |||
Next | |||
End If | |||
If Not IsEmpty(order_string_or_array) then | |||
sql = sql & " ORDER BY " | |||
If IsArray(order_string_or_array) then | |||
dim order_array : order_array = order_string_or_array | |||
For i = 0 to UBound(order_array) | |||
If i > 0 then sql = sql & ", " | |||
sql = sql & " " & order_array(i) | |||
Next | |||
Else | |||
sql = sql & order_string_or_array & " " | |||
End If | |||
End If | |||
dim list : set list = new LinkedList_Class | |||
dim rs : set rs = DAL.PagedQuery(sql, where_values, per_page, page_num) | |||
If Not rs.EOF and Not (IsEmpty(per_page) and IsEmpty(page_num) and IsEmpty(page_count) and IsEmpty(record_count)) then | |||
rs.PageSize = per_page | |||
rs.AbsolutePage = page_num | |||
page_count = rs.PageCount | |||
record_count = rs.RecordCount | |||
End If | |||
set SearchTablePaged = PagedInkjetRecordsList(rs, per_page) | |||
Destroy rs | |||
End Function | |||
Private Function PagedInkjetRecordsList(rs, per_page) | |||
dim list : set list = new LinkedList_Class | |||
dim x : x =0 | |||
Do While x < per_page and Not rs.EOF | |||
list.Push Automapper.AutoMap(rs, new InkjetRecordsModel_Class) | |||
x = x +1 | |||
rs.MoveNext | |||
Loop | |||
set PagedInkjetRecordsList = list | |||
End Function | |||
Private Function InkjetRecordsNotFoundException(ByVal field_name, ByVal field_val) | |||
InkjetRecordsNotFoundException = "InkjetRecords was not found with " & field_name & " of '" & field_val & "'." | |||
End Function | |||
Private Function InkjetRecordsList(rs) | |||
dim list : set list = new LinkedList_Class | |||
dim model | |||
Do until rs.EOF | |||
set model = new InkjetRecordsModel_Class | |||
list.Push Automapper.AutoMap(rs, model) | |||
rs.MoveNext | |||
Loop | |||
set InkjetRecordsList = list | |||
End Function | |||
Public Sub AddNew(ByRef model) | |||
dim sql : sql = "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]," &_ | |||
"[CassADDRESS1]," &_ | |||
"[CassADDRESS2]," &_ | |||
"[CassADDRESS3]," &_ | |||
"[CassADDRESS4]," &_ | |||
"[CassADDRESS5])" &_ | |||
"VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)" | |||
DAL.Execute sql, Array(model.KitID, _ | |||
model.VOTERID, _ | |||
model.LASTNAME, _ | |||
model.FIRSTNAME, _ | |||
model.MIDDLENAME, _ | |||
model.SUFFIX, _ | |||
model.PRECINCT, _ | |||
model.ADDRESS1, _ | |||
model.ADDRESS2, _ | |||
model.ADDRESS3, _ | |||
model.ADDRESS4, _ | |||
model.ADDRESS5, _ | |||
model.APPSENT, _ | |||
model.APPRETURNED, _ | |||
model.BALSENT, _ | |||
model.BALRETURNED, _ | |||
model.CountingBoard, _ | |||
model.UOCAVASTATUS, _ | |||
model.EMAILADDRESS, _ | |||
model.PHONENUMBER, _ | |||
model.BALLOT_NUMBER, _ | |||
model.CassADDRESS1, _ | |||
model.CassADDRESS2, _ | |||
model.CassADDRESS3, _ | |||
model.CassADDRESS4, _ | |||
model.CassADDRESS5) | |||
sql = "SELECT TOP 1 ID FROM [InkjetRecords] ORDER BY ID DESC" | |||
dim rs : set rs = DAL.Query(sql, empty) | |||
model.ID = rs("ID") | |||
Destroy rs | |||
End Sub | |||
Public Sub Update(model) | |||
dim sql : sql = "UPDATE [InkjetRecords] SET [KitID] = ?," &_ | |||
"[VOTERID] = ?," &_ | |||
"[LASTNAME] = ?," &_ | |||
"[FIRSTNAME] = ?," &_ | |||
"[MIDDLENAME] = ?," &_ | |||
"[SUFFIX] = ?," &_ | |||
"[PRECINCT] = ?," &_ | |||
"[ADDRESS1] = ?," &_ | |||
"[ADDRESS2] = ?," &_ | |||
"[ADDRESS3] = ?," &_ | |||
"[ADDRESS4] = ?," &_ | |||
"[ADDRESS5] = ?," &_ | |||
"[APPSENT] = ?," &_ | |||
"[APPRETURNED] = ?," &_ | |||
"[BALSENT] = ?," &_ | |||
"[BALRETURNED] = ?," &_ | |||
"[CountingBoard] = ?," &_ | |||
"[UOCAVASTATUS] = ?," &_ | |||
"[EMAILADDRESS] = ?," &_ | |||
"[PHONENUMBER] = ?," &_ | |||
"[BALLOT_NUMBER] = ?," &_ | |||
"[CassADDRESS1] = ?," &_ | |||
"[CassADDRESS2] = ?," &_ | |||
"[CassADDRESS3] = ?," &_ | |||
"[CassADDRESS4] = ?," &_ | |||
"[CassADDRESS5] = ?" &_ | |||
" WHERE [ID] = ?" | |||
DAL.Execute sql, Array(model.KitID, _ | |||
model.VOTERID, _ | |||
model.LASTNAME, _ | |||
model.FIRSTNAME, _ | |||
model.MIDDLENAME, _ | |||
model.SUFFIX, _ | |||
model.PRECINCT, _ | |||
model.ADDRESS1, _ | |||
model.ADDRESS2, _ | |||
model.ADDRESS3, _ | |||
model.ADDRESS4, _ | |||
model.ADDRESS5, _ | |||
model.APPSENT, _ | |||
model.APPRETURNED, _ | |||
model.BALSENT, _ | |||
model.BALRETURNED, _ | |||
model.CountingBoard, _ | |||
model.UOCAVASTATUS, _ | |||
model.EMAILADDRESS, _ | |||
model.PHONENUMBER, _ | |||
model.BALLOT_NUMBER, _ | |||
model.CassADDRESS1, _ | |||
model.CassADDRESS2, _ | |||
model.CassADDRESS3, _ | |||
model.CassADDRESS4, _ | |||
model.CassADDRESS5, _ | |||
model.ID) | |||
End Sub | |||
Public Sub Delete(id) | |||
dim sql : sql = "DELETE FROM [InkjetRecords] WHERE [ID] = ?" | |||
DAL.Execute sql, id | |||
End Sub | |||
End Class | |||
dim InkjetRecordsRepository__Singleton | |||
Function InkjetRecordsRepository() | |||
If IsEmpty(InkjetRecordsRepository__Singleton) then | |||
set InkjetRecordsRepository__Singleton = new InkjetRecordsRepository_Class | |||
End If | |||
set InkjetRecordsRepository = InkjetRecordsRepository__Singleton | |||
End Function | |||
%> |
@@ -30,7 +30,9 @@ End CLass | |||
'======================================================================================================================= | |||
Class KitLabelsRepository_Class | |||
Public Function PagedPurpleEnvelopsIndexView(where_kvarray, order_string_or_array, per_page, page_num, ByRef page_count, ByRef record_count) | |||
End Function | |||
Public Function FindByID(ID) | |||
dim sql : sql = "Select [ID], [KitId], [OutboundSerial], [InBoundSerial], [OutboundIMB], [InBoundIMB], [OutboundIMBDigits], [InBoundIMBDigits],OutboundIMBPNG,INBOUNDIMBPNG,[SetNumber] FROM [KitLabels] WHERE ID = ?" | |||
dim rs : set rs = DAL.Query(sql,ID) | |||
@@ -44,6 +44,27 @@ End Class | |||
Class KitRepository_Class | |||
Public Function PagedPurpleEnvelopsIndexView(per_page, page_num, ByRef page_count, ByRef record_count) | |||
dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber], " &_ | |||
"Jurisdiction.Name As Jurisdiction," &_ | |||
"(SELECT COUNT(*) From KitLabels Where KitId = Kit.ID)" &_ | |||
" As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[JobType] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode Where Kit.JobType = 'Purple Envelopes';" | |||
dim list : set list = new LinkedList_Class | |||
dim rs : set rs = DAL.PagedQuery(sql, empty, per_page, page_num) | |||
If Not rs.EOF and Not (IsEmpty(per_page) and IsEmpty(page_num) and IsEmpty(page_count) and IsEmpty(record_count)) then | |||
rs.PageSize = per_page | |||
rs.AbsolutePage = page_num | |||
page_count = rs.PageCount | |||
record_count = rs.RecordCount | |||
End If | |||
set PagedPurpleEnvelopsIndexView = PagedIndexViewKitList(rs, per_page) | |||
Destroy rs | |||
End Function | |||
Public Function PagedIndexView(per_page, page_num, ByRef page_count, ByRef record_count) | |||
dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber], " &_ | |||
"Jurisdiction.Name As Jurisdiction," &_ | |||
@@ -0,0 +1,52 @@ | |||
<% | |||
Class PagedIndex_ViewModel_Class | |||
Public Title | |||
Public InkjetRecords | |||
Public CurrentPageNumber | |||
Public PageSize | |||
Public PageCount | |||
Public RecordCount | |||
End Class | |||
Class Edit_ViewModel_Class | |||
Public Title | |||
Public InkjetRecords | |||
End Class | |||
Class Create_ViewModel_Class | |||
Public KitID | |||
Public VOTERID | |||
Public LASTNAME | |||
Public FIRSTNAME | |||
Public MIDDLENAME | |||
Public SUFFIX | |||
Public PRECINCT | |||
Public ADDRESS1 | |||
Public ADDRESS2 | |||
Public ADDRESS3 | |||
Public ADDRESS4 | |||
Public ADDRESS5 | |||
Public APPSENT | |||
Public APPRETURNED | |||
Public BALSENT | |||
Public BALRETURNED | |||
Public CountingBoard | |||
Public UOCAVASTATUS | |||
Public EMAILADDRESS | |||
Public PHONENUMBER | |||
Public BALLOT_NUMBER | |||
Public CassADDRESS1 | |||
Public CassADDRESS2 | |||
Public CassADDRESS3 | |||
Public CassADDRESS4 | |||
Public CassADDRESS5 | |||
End Class | |||
Class Delete_ViewModel_Class | |||
Public Title | |||
Public InkjetRecords | |||
End Class | |||
%> |
@@ -21,6 +21,15 @@ Class SwitchBoard_ViewModel_Class | |||
Public Labels | |||
End Class | |||
Class SwitchBoard_PurpleEnvelopesViewModel_Class | |||
Public Title | |||
Public Kit | |||
Public CurrentPageNumber | |||
Public PageSize | |||
Public PageCount | |||
Public RecordCount | |||
End Class | |||
Class Create_ViewModel_Class | |||
Public Title | |||
@@ -11,7 +11,7 @@ | |||
<a href="#" class="list-group-item list-group-item-action active">Switchboard</a> | |||
<%= Html.LinkTOExt("Create Kit","Home","CreateKit",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
<%= Html.LinkTOExt("View Tracking Kits","Kit","SwitchBoardIndex",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
<%= Html.LinkTOExt("View Purple Envelope Jobs","Kit","SwitchBoardIndex",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
<%= Html.LinkTOExt("View Purple Envelope Jobs","Kit","SwitchBoardPurpleEnvelopsIndex",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
</div> | |||
</div> | |||
</div | |||
@@ -0,0 +1,221 @@ | |||
<h2>Create InkjetRecords</h2> | |||
<%= HTML.FormTag("InkjetRecords", "CreatePost", empty, empty) %> | |||
<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("InkjetRecordsCreateForm")) %> | |||
<hr /> | |||
<div class="form-group"> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="KitID">KitID</label> | |||
<%= HTML.TextboxExt("KitID", Model.KitID, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="VOTERID">VOTERID</label> | |||
<%= HTML.TextboxExt("VOTERID", Model.VOTERID, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="LASTNAME">LASTNAME</label> | |||
<%= HTML.TextboxExt("LASTNAME", Model.LASTNAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="FIRSTNAME">FIRSTNAME</label> | |||
<%= HTML.TextboxExt("FIRSTNAME", Model.FIRSTNAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="MIDDLENAME">MIDDLENAME</label> | |||
<%= HTML.TextboxExt("MIDDLENAME", Model.MIDDLENAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="SUFFIX">SUFFIX</label> | |||
<%= HTML.TextboxExt("SUFFIX", Model.SUFFIX, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="PRECINCT">PRECINCT</label> | |||
<%= HTML.TextboxExt("PRECINCT", Model.PRECINCT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS1">ADDRESS1</label> | |||
<%= HTML.TextboxExt("ADDRESS1", Model.ADDRESS1, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS2">ADDRESS2</label> | |||
<%= HTML.TextboxExt("ADDRESS2", Model.ADDRESS2, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS3">ADDRESS3</label> | |||
<%= HTML.TextboxExt("ADDRESS3", Model.ADDRESS3, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS4">ADDRESS4</label> | |||
<%= HTML.TextboxExt("ADDRESS4", Model.ADDRESS4, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS5">ADDRESS5</label> | |||
<%= HTML.TextboxExt("ADDRESS5", Model.ADDRESS5, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="APPSENT">APPSENT</label> | |||
<%= HTML.TextboxExt("APPSENT", Model.APPSENT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="APPRETURNED">APPRETURNED</label> | |||
<%= HTML.TextboxExt("APPRETURNED", Model.APPRETURNED, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALSENT">BALSENT</label> | |||
<%= HTML.TextboxExt("BALSENT", Model.BALSENT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALRETURNED">BALRETURNED</label> | |||
<%= HTML.TextboxExt("BALRETURNED", Model.BALRETURNED, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CountingBoard">CountingBoard</label> | |||
<%= HTML.TextboxExt("CountingBoard", Model.CountingBoard, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="UOCAVASTATUS">UOCAVASTATUS</label> | |||
<%= HTML.TextboxExt("UOCAVASTATUS", Model.UOCAVASTATUS, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="EMAILADDRESS">EMAILADDRESS</label> | |||
<%= HTML.TextboxExt("EMAILADDRESS", Model.EMAILADDRESS, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="PHONENUMBER">PHONENUMBER</label> | |||
<%= HTML.TextboxExt("PHONENUMBER", Model.PHONENUMBER, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALLOT_NUMBER">BALLOT_NUMBER</label> | |||
<%= HTML.TextboxExt("BALLOT_NUMBER", Model.BALLOT_NUMBER, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS1">CassADDRESS1</label> | |||
<%= HTML.TextboxExt("CassADDRESS1", Model.CassADDRESS1, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS2">CassADDRESS2</label> | |||
<%= HTML.TextboxExt("CassADDRESS2", Model.CassADDRESS2, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS3">CassADDRESS3</label> | |||
<%= HTML.TextboxExt("CassADDRESS3", Model.CassADDRESS3, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS4">CassADDRESS4</label> | |||
<%= HTML.TextboxExt("CassADDRESS4", Model.CassADDRESS4, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS5">CassADDRESS5</label> | |||
<%= HTML.TextboxExt("CassADDRESS5", Model.CassADDRESS5, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<%= HTML.Button("submit", "<i class='glyphicon glyphicon-ok'></i> Create", "btn-primary") %> | |||
| |||
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-remove'></i> Cancel", "InkjetRecords", "Index", empty, Array("class", "btn btn-default")) %> | |||
</div> | |||
</form> |
@@ -0,0 +1,223 @@ | |||
<h2><%= H(Model.Title) %></h2> | |||
<p class="alert alert-danger">Are you sure you want to delete this InkjetRecords?</p> | |||
<%= HTML.FormTag("InkjetRecords", "DeletePost", empty, Array("class", "form-horizontal")) %> | |||
<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("InkjetRecordsDeleteForm")) %> | |||
<%= HTML.Hidden("Id", Model.InkjetRecords.ID) %> | |||
<div class="col-md-10"> | |||
<div class="form-group"> | |||
<%= HTML.Button("submit", "<i class='glyphicon glyphicon-remove'></i> Confirm Delete", "btn-danger") %> | |||
| |||
<%= HTML.LinkToExt("Cancel", "InkjetRecords", "Index", empty, Array("class", "btn btn-success")) %> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="KitID">KitID</label> | |||
<%= HTML.TextboxExt("KitID", Model.InkjetRecords.KitID, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="VOTERID">VOTERID</label> | |||
<%= HTML.TextboxExt("VOTERID", Model.InkjetRecords.VOTERID, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="LASTNAME">LASTNAME</label> | |||
<%= HTML.TextboxExt("LASTNAME", Model.InkjetRecords.LASTNAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="FIRSTNAME">FIRSTNAME</label> | |||
<%= HTML.TextboxExt("FIRSTNAME", Model.InkjetRecords.FIRSTNAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="MIDDLENAME">MIDDLENAME</label> | |||
<%= HTML.TextboxExt("MIDDLENAME", Model.InkjetRecords.MIDDLENAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="SUFFIX">SUFFIX</label> | |||
<%= HTML.TextboxExt("SUFFIX", Model.InkjetRecords.SUFFIX, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="PRECINCT">PRECINCT</label> | |||
<%= HTML.TextboxExt("PRECINCT", Model.InkjetRecords.PRECINCT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS1">ADDRESS1</label> | |||
<%= HTML.TextboxExt("ADDRESS1", Model.InkjetRecords.ADDRESS1, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS2">ADDRESS2</label> | |||
<%= HTML.TextboxExt("ADDRESS2", Model.InkjetRecords.ADDRESS2, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS3">ADDRESS3</label> | |||
<%= HTML.TextboxExt("ADDRESS3", Model.InkjetRecords.ADDRESS3, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS4">ADDRESS4</label> | |||
<%= HTML.TextboxExt("ADDRESS4", Model.InkjetRecords.ADDRESS4, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS5">ADDRESS5</label> | |||
<%= HTML.TextboxExt("ADDRESS5", Model.InkjetRecords.ADDRESS5, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="APPSENT">APPSENT</label> | |||
<%= HTML.TextboxExt("APPSENT", Model.InkjetRecords.APPSENT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="APPRETURNED">APPRETURNED</label> | |||
<%= HTML.TextboxExt("APPRETURNED", Model.InkjetRecords.APPRETURNED, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALSENT">BALSENT</label> | |||
<%= HTML.TextboxExt("BALSENT", Model.InkjetRecords.BALSENT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALRETURNED">BALRETURNED</label> | |||
<%= HTML.TextboxExt("BALRETURNED", Model.InkjetRecords.BALRETURNED, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CountingBoard">CountingBoard</label> | |||
<%= HTML.TextboxExt("CountingBoard", Model.InkjetRecords.CountingBoard, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="UOCAVASTATUS">UOCAVASTATUS</label> | |||
<%= HTML.TextboxExt("UOCAVASTATUS", Model.InkjetRecords.UOCAVASTATUS, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="EMAILADDRESS">EMAILADDRESS</label> | |||
<%= HTML.TextboxExt("EMAILADDRESS", Model.InkjetRecords.EMAILADDRESS, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="PHONENUMBER">PHONENUMBER</label> | |||
<%= HTML.TextboxExt("PHONENUMBER", Model.InkjetRecords.PHONENUMBER, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALLOT_NUMBER">BALLOT_NUMBER</label> | |||
<%= HTML.TextboxExt("BALLOT_NUMBER", Model.InkjetRecords.BALLOT_NUMBER, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS1">CassADDRESS1</label> | |||
<%= HTML.TextboxExt("CassADDRESS1", Model.InkjetRecords.CassADDRESS1, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS2">CassADDRESS2</label> | |||
<%= HTML.TextboxExt("CassADDRESS2", Model.InkjetRecords.CassADDRESS2, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS3">CassADDRESS3</label> | |||
<%= HTML.TextboxExt("CassADDRESS3", Model.InkjetRecords.CassADDRESS3, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS4">CassADDRESS4</label> | |||
<%= HTML.TextboxExt("CassADDRESS4", Model.InkjetRecords.CassADDRESS4, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS5">CassADDRESS5</label> | |||
<%= HTML.TextboxExt("CassADDRESS5", Model.InkjetRecords.CassADDRESS5, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</form> |
@@ -0,0 +1,221 @@ | |||
<h2><%= H(Model.Title) %></h2> | |||
<%= HTML.FormTag("InkjetRecords", "EditPost", empty, empty) %> | |||
<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("InkjetRecordsEditForm")) %> | |||
<%= HTML.Hidden("Id", Model.InkjetRecords.ID) %> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="KitID">KitID</label> | |||
<%= HTML.TextboxExt("KitID", Model.InkjetRecords.KitID, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="VOTERID">VOTERID</label> | |||
<%= HTML.TextboxExt("VOTERID", Model.InkjetRecords.VOTERID, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="LASTNAME">LASTNAME</label> | |||
<%= HTML.TextboxExt("LASTNAME", Model.InkjetRecords.LASTNAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="FIRSTNAME">FIRSTNAME</label> | |||
<%= HTML.TextboxExt("FIRSTNAME", Model.InkjetRecords.FIRSTNAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="MIDDLENAME">MIDDLENAME</label> | |||
<%= HTML.TextboxExt("MIDDLENAME", Model.InkjetRecords.MIDDLENAME, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="SUFFIX">SUFFIX</label> | |||
<%= HTML.TextboxExt("SUFFIX", Model.InkjetRecords.SUFFIX, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="PRECINCT">PRECINCT</label> | |||
<%= HTML.TextboxExt("PRECINCT", Model.InkjetRecords.PRECINCT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS1">ADDRESS1</label> | |||
<%= HTML.TextboxExt("ADDRESS1", Model.InkjetRecords.ADDRESS1, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS2">ADDRESS2</label> | |||
<%= HTML.TextboxExt("ADDRESS2", Model.InkjetRecords.ADDRESS2, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS3">ADDRESS3</label> | |||
<%= HTML.TextboxExt("ADDRESS3", Model.InkjetRecords.ADDRESS3, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS4">ADDRESS4</label> | |||
<%= HTML.TextboxExt("ADDRESS4", Model.InkjetRecords.ADDRESS4, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="ADDRESS5">ADDRESS5</label> | |||
<%= HTML.TextboxExt("ADDRESS5", Model.InkjetRecords.ADDRESS5, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="APPSENT">APPSENT</label> | |||
<%= HTML.TextboxExt("APPSENT", Model.InkjetRecords.APPSENT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="APPRETURNED">APPRETURNED</label> | |||
<%= HTML.TextboxExt("APPRETURNED", Model.InkjetRecords.APPRETURNED, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALSENT">BALSENT</label> | |||
<%= HTML.TextboxExt("BALSENT", Model.InkjetRecords.BALSENT, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALRETURNED">BALRETURNED</label> | |||
<%= HTML.TextboxExt("BALRETURNED", Model.InkjetRecords.BALRETURNED, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CountingBoard">CountingBoard</label> | |||
<%= HTML.TextboxExt("CountingBoard", Model.InkjetRecords.CountingBoard, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="UOCAVASTATUS">UOCAVASTATUS</label> | |||
<%= HTML.TextboxExt("UOCAVASTATUS", Model.InkjetRecords.UOCAVASTATUS, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="EMAILADDRESS">EMAILADDRESS</label> | |||
<%= HTML.TextboxExt("EMAILADDRESS", Model.InkjetRecords.EMAILADDRESS, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="PHONENUMBER">PHONENUMBER</label> | |||
<%= HTML.TextboxExt("PHONENUMBER", Model.InkjetRecords.PHONENUMBER, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="BALLOT_NUMBER">BALLOT_NUMBER</label> | |||
<%= HTML.TextboxExt("BALLOT_NUMBER", Model.InkjetRecords.BALLOT_NUMBER, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS1">CassADDRESS1</label> | |||
<%= HTML.TextboxExt("CassADDRESS1", Model.InkjetRecords.CassADDRESS1, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS2">CassADDRESS2</label> | |||
<%= HTML.TextboxExt("CassADDRESS2", Model.InkjetRecords.CassADDRESS2, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS3">CassADDRESS3</label> | |||
<%= HTML.TextboxExt("CassADDRESS3", Model.InkjetRecords.CassADDRESS3, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS4">CassADDRESS4</label> | |||
<%= HTML.TextboxExt("CassADDRESS4", Model.InkjetRecords.CassADDRESS4, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="CassADDRESS5">CassADDRESS5</label> | |||
<%= HTML.TextboxExt("CassADDRESS5", Model.InkjetRecords.CassADDRESS5, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<hr /> | |||
<div class="form-group"> | |||
<% = HTML.Button("submit", "<i class='glyphicon glyphicon-ok'></i> Save", "btn-primary") %> | |||
| |||
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-remove'></i> Delete", "InkjetRecords", "Delete", Array("id", Model.InkjetRecords.ID), Array("class", "btn btn-danger")) %> | |||
| |||
<%= HTML.LinkToExt("Cancel", "InkjetRecords", "Index", empty, Array("class", "btn btn-default")) %> | |||
</div> | |||
</form> |
@@ -0,0 +1,121 @@ | |||
<h2><%= H(Model.Title) %></h2> | |||
<div class="row"> | |||
<div class="col-md-8 col-sm-8 col-xs-12"> | |||
<%= H(Model.RecordCount) %> InkjetRecords found. Showing <%= H(Model.PageSize) %> records per page. | |||
<%= HTML.LinkToExt("<i class='bi bi-plus-square-fill'></i> New","InkjetRecords", "Create", empty, Array("class", "btn btn-xs btn-primary")) %> | |||
</div> | |||
<div class="col-md-4 col-sm-4 col-xs-12"> | |||
<%= HTML.FormTag("InkjetRecords", "Search", empty, empty) %> | |||
<div class="col-md-10 col-sm-10 col-xs-12"> | |||
<label class="sr-only" for="search">Search</label> | |||
<div class="input-group"> | |||
<input type="text" class="form-control input-search" value='<%= Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q")) %>' name="q" id="search" placeholder="Search"> | |||
<span class="input-group-addon group-icon"><span class="glyphicon glyphicon-eye-open"></span> | |||
<button type="submit" class="btn btn-success"><i class="bi bi-search"></i>Search</buttton> | |||
</div> | |||
</div> | |||
</form> | |||
</div> | |||
</div> | |||
<table id="InkjetRecords" class="table table-striped"> | |||
<thead> | |||
<tr> | |||
<th></th> | |||
<th style="text-align: left">ID</th> | |||
<th style="text-align: left">KitID</th> | |||
<th style="text-align: left">VOTERID</th> | |||
<th style="text-align: left">LASTNAME</th> | |||
<th style="text-align: left">FIRSTNAME</th> | |||
<th style="text-align: left">MIDDLENAME</th> | |||
<th style="text-align: left">SUFFIX</th> | |||
<th style="text-align: left">PRECINCT</th> | |||
<th style="text-align: left">ADDRESS1</th> | |||
<th style="text-align: left">ADDRESS2</th> | |||
<th style="text-align: left">ADDRESS3</th> | |||
<th style="text-align: left">ADDRESS4</th> | |||
<th style="text-align: left">ADDRESS5</th> | |||
<th style="text-align: left">APPSENT</th> | |||
<th style="text-align: left">APPRETURNED</th> | |||
<th style="text-align: left">BALSENT</th> | |||
<th style="text-align: left">BALRETURNED</th> | |||
<th style="text-align: left">CountingBoard</th> | |||
<th style="text-align: left">UOCAVASTATUS</th> | |||
<th style="text-align: left">EMAILADDRESS</th> | |||
<th style="text-align: left">PHONENUMBER</th> | |||
<th style="text-align: left">BALLOT_NUMBER</th> | |||
<th style="text-align: left">CassADDRESS1</th> | |||
<th style="text-align: left">CassADDRESS2</th> | |||
<th style="text-align: left">CassADDRESS3</th> | |||
<th style="text-align: left">CassADDRESS4</th> | |||
<th style="text-align: left">CassADDRESS5</th> | |||
<th></th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<% dim it : set it = Model.InkjetRecords.Iterator %> | |||
<% dim InkjetRecords %> | |||
<% While it.HasNext %> | |||
<% set InkjetRecords = it.GetNext() %> | |||
<tr> | |||
<td> | |||
<%= HTML.LinkToExt("<i class='bi bi-search'></i>", "InkjetRecords", "Edit", Array("Id", InkjetRecords.ID), Array("class", "btn btn-primary")) %> | |||
</td> | |||
<td><% = H(InkjetRecords.ID) %></td> | |||
<td><% = H(InkjetRecords.KitID) %></td> | |||
<td><% = H(InkjetRecords.VOTERID) %></td> | |||
<td><% = H(InkjetRecords.LASTNAME) %></td> | |||
<td><% = H(InkjetRecords.FIRSTNAME) %></td> | |||
<td><% = H(InkjetRecords.MIDDLENAME) %></td> | |||
<td><% = H(InkjetRecords.SUFFIX) %></td> | |||
<td><% = H(InkjetRecords.PRECINCT) %></td> | |||
<td><% = H(InkjetRecords.ADDRESS1) %></td> | |||
<td><% = H(InkjetRecords.ADDRESS2) %></td> | |||
<td><% = H(InkjetRecords.ADDRESS3) %></td> | |||
<td><% = H(InkjetRecords.ADDRESS4) %></td> | |||
<td><% = H(InkjetRecords.ADDRESS5) %></td> | |||
<td><% = H(InkjetRecords.APPSENT) %></td> | |||
<td><% = H(InkjetRecords.APPRETURNED) %></td> | |||
<td><% = H(InkjetRecords.BALSENT) %></td> | |||
<td><% = H(InkjetRecords.BALRETURNED) %></td> | |||
<td><% = H(InkjetRecords.CountingBoard) %></td> | |||
<td><% = H(InkjetRecords.UOCAVASTATUS) %></td> | |||
<td><% = H(InkjetRecords.EMAILADDRESS) %></td> | |||
<td><% = H(InkjetRecords.PHONENUMBER) %></td> | |||
<td><% = H(InkjetRecords.BALLOT_NUMBER) %></td> | |||
<td><% = H(InkjetRecords.CassADDRESS1) %></td> | |||
<td><% = H(InkjetRecords.CassADDRESS2) %></td> | |||
<td><% = H(InkjetRecords.CassADDRESS3) %></td> | |||
<td><% = H(InkjetRecords.CassADDRESS4) %></td> | |||
<td><% = H(InkjetRecords.CassADDRESS5) %></td> | |||
</tr> | |||
<% Wend %> | |||
</tbody> | |||
</table> | |||
<div> | |||
<% If Model.CurrentPageNumber <> 1 then %> | |||
<%= HTML.LinkToExt("<i class='bi bi-chevron-left'></i><i class='bi bi-chevron-left'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", 1,"q", Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q"))), Array("class", "btn btn-default")) %> | |||
| |||
<%= HTML.LinkToExt("<i class='bi bi-chevron-left'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", Model.CurrentPageNumber - 1,"q", Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q"))), Array("class", "btn btn-default")) %> | |||
| |||
<% Else %> | |||
<a class='btn btn-default disabled'><i class='bi bi-chevron-left'></i><i class='bi bi-chevron-left'></i></a> | |||
| |||
<a class='btn btn-default disabled'><i class='bi bi-chevron-left'></i></a> | |||
| |||
<% End If %> | |||
<% If CInt(Model.CurrentPageNumber) < CInt(Model.PageCount) then %> | |||
<%= HTML.LinkToExt("<i class='bi bi-chevron-right'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", Model.CurrentPageNumber + 1,"q", Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q"))), Array("class", "btn btn-default")) %> | |||
| |||
<%= HTML.LinkToExt("<i class='bi bi-chevron-right'></i><i class='bi bi-chevron-right'></i>", MVC.ControllerName, MVC.ActionName, Array("page_num", Model.PageCount,"q", Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q"))), Array("class", "btn btn-default")) %> | |||
| |||
<% Else %> | |||
<a class='btn btn-default disabled'><i class='bi bi-chevron-right'></i><i class='bi bi-chevron-right'></i></a> | |||
| |||
<a class='btn btn-default disabled'><i class='bi bi-chevron-right'></i></a> | |||
| |||
<% End If %> | |||
</div> | |||
</div> |
@@ -28,6 +28,7 @@ | |||
<li><%= Html.LinkTOExt("Kit","Kit","Index",empty,Array("Class","dropdown-item")) %></li> | |||
<li><%= Html.LinkTOExt("KitLabels","KitLabels","Index",empty,Array("Class","dropdown-item")) %></li> | |||
<li><%= Html.LinkTOExt("Settings","Settings","Index",empty,Array("Class","dropdown-item")) %></li> | |||
<li><%= Html.LinkTOExt("InkjetRecords","InkjetRecords","Index",empty,Array("Class","dropdown-item")) %></li> | |||
<!--nav bar admin placeholder--> | |||
</ul> | |||
</li> | |||
@@ -57,3 +58,4 @@ | |||
@@ -1,8 +1,9 @@ | |||
<!--#include file="../MVC/lib.all.asp"--> | |||
<!--#include file="DAL/lib.DAL.asp"--> | |||
<!--#include file="app.Config.asp"--> | |||
<!--#include file="DomainModels/ContactsRepository.asp"--> | |||
<!--#include file="DomainModels/InkjetRecordsRepository.asp"--> | |||
<!--#include file="DomainModels/JurisdictionRepository.asp"--> | |||
<!--#include file="DomainModels/KitRepository.asp"--> | |||
<!--#include file="DomainModels/KitLabelsRepository.asp"--> | |||
<!--#include file="DomainModels/SettingsRepository.asp"--> | |||
<!--#include file="DomainModels/SettingsRepository.asp"--> | |||
<!--#include file="DomainModels/ContactsRepository.asp"--> |
@@ -0,0 +1,92 @@ | |||
X Add links in the data base foreign keys | |||
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 | |||
cicd turn off application pool and site before unzipping then restart app and site | |||
cicd install service and start | |||
cicd stop service and copy zip to folder | |||
create a list and import and export and process to cass and pave | |||
update label export as pdf for printing | |||
add report man dll for dependancies | |||
update label csv export for snail works | |||
update inkjet createion and csv export for snail works | |||
CREATE TABLE [InkjetRecords] ( | |||
[ID] COUNTER, | |||
[KitID] LONG, | |||
[VOTERID] VARCHAR(255), | |||
[LASTNAME] VARCHAR(255), | |||
[FIRSTNAME] VARCHAR(255), | |||
[MIDDLENAME] VARCHAR(255), | |||
[SUFFIX] VARCHAR(255), | |||
[PRECINCT] VARCHAR(255), | |||
[ADDRESS1] VARCHAR(255), | |||
[ADDRESS2] VARCHAR(255), | |||
[ADDRESS3] VARCHAR(255), | |||
[ADDRESS4] VARCHAR(255), | |||
[ADDRESS5] VARCHAR(255), | |||
[APPSENT] VARCHAR(255), | |||
[APPRETURNED] VARCHAR(255), | |||
[BALSENT] VARCHAR(255), | |||
[BALRETURNED] VARCHAR(255), | |||
[CountingBoard] VARCHAR(255), | |||
[UOCAVASTATUS] VARCHAR(255), | |||
[EMAILADDRESS] VARCHAR(255), | |||
[PHONENUMBER] VARCHAR(255), | |||
[BALLOT_NUMBER] VARCHAR(255), | |||
[CassADDRESS1] VARCHAR(255), | |||
[CassADDRESS2] VARCHAR(255), | |||
[CassADDRESS3] VARCHAR(255), | |||
[CassADDRESS4] VARCHAR(255), | |||
[CassADDRESS5] VARCHAR(255) | |||
); | |||
CREATE UNIQUE INDEX [ID] ON [InkjetRecords]( [ID] ) WITH PRIMARY; | |||
CREATE INDEX [Jcode] ON [InkjetRecords]( [KitID] ); | |||
-- Foreign Key Index will be created after with Constraints | |||
-- CREATE INDEX [KitInkjetRecords] ON [InkjetRecords]( [KitID] ); | |||
CREATE TABLE [Kit] ( | |||
[ID] COUNTER, | |||
[JobNumber] VARCHAR(255), | |||
[Jcode] VARCHAR(255), | |||
[CreatedOn] DATETIME, | |||
[LabelsPrinted] DATETIME, | |||
[ExportedToSnailWorks] DATETIME, | |||
[InkJetJob] BIT DEFAULT '0' | |||
); | |||
CREATE UNIQUE INDEX [ID] ON [Kit]( [ID] ) WITH PRIMARY; | |||
CREATE TABLE [KitLabels] ( | |||
[ID] COUNTER, | |||
[KitId] LONG, | |||
[OutboundSerial] VARCHAR(255), | |||
[InBoundSerial] VARCHAR(255), | |||
[OutboundIMB] VARCHAR(255), | |||
[InBoundIMB] VARCHAR(255), | |||
[OutboundIMBDigits] VARCHAR(255), | |||
[InBoundIMBDigits] VARCHAR(255), | |||
[OutboundIMBPNG] MEMO, | |||
[INBOUNDIMBPNG] MEMO, | |||
[SetNumber] DOUBLE | |||
); | |||
CREATE UNIQUE INDEX [ID] ON [KitLabels]( [ID] ) WITH PRIMARY; | |||
-- Foreign Key Index will be created after with Constraints | |||
-- CREATE INDEX [KitKitLabels] ON [KitLabels]( [KitId] ); | |||
ALTER TABLE [InkjetRecords] ADD CONSTRAINT [KitInkjetRecords] | |||
FOREIGN KEY ( [KitID] ) | |||
REFERENCES [Kit] ( [ID] ) | |||
ON UPDATE CASCADE | |||
ON DELETE CASCADE; | |||
ALTER TABLE [KitLabels] ADD CONSTRAINT [KitKitLabels] | |||
FOREIGN KEY ( [KitId] ) | |||
REFERENCES [Kit] ( [ID] ) | |||
ON UPDATE CASCADE | |||
ON DELETE CASCADE; |
Powered by TurnKey Linux.