diff --git a/App/Controllers/InkjetRecords/InkjetRecordsController.asp b/App/Controllers/InkjetRecords/InkjetRecordsController.asp new file mode 100644 index 0000000..654113b --- /dev/null +++ b/App/Controllers/InkjetRecords/InkjetRecordsController.asp @@ -0,0 +1,129 @@ +<% Option Explicit %> + + +<% +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 + %> <% + + 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 + %> <% + + 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" + %> <% + 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" + + %> <% + 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" + + %> <% + 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 +%> diff --git a/App/Controllers/Kit/KitController.asp b/App/Controllers/Kit/KitController.asp index f6df8f1..3961e58 100644 --- a/App/Controllers/Kit/KitController.asp +++ b/App/Controllers/Kit/KitController.asp @@ -17,8 +17,23 @@ Class KitController Model.PageCount = page_count Model.RecordCount = record_count %> <% + 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 + %> <% End Sub + Public Sub Index dim page_size : page_size = 10 diff --git a/App/DomainModels/InkjetRecordsRepository.asp b/App/DomainModels/InkjetRecordsRepository.asp new file mode 100644 index 0000000..9556ae1 --- /dev/null +++ b/App/DomainModels/InkjetRecordsRepository.asp @@ -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 +%> diff --git a/App/DomainModels/KitLabelsRepository.asp b/App/DomainModels/KitLabelsRepository.asp index 3741f04..584c405 100644 --- a/App/DomainModels/KitLabelsRepository.asp +++ b/App/DomainModels/KitLabelsRepository.asp @@ -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) diff --git a/App/DomainModels/KitRepository.asp b/App/DomainModels/KitRepository.asp index acf510d..98bbbe5 100644 --- a/App/DomainModels/KitRepository.asp +++ b/App/DomainModels/KitRepository.asp @@ -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," &_ diff --git a/App/ViewModels/InkjetRecordsViewModels.asp b/App/ViewModels/InkjetRecordsViewModels.asp new file mode 100644 index 0000000..04bf6ec --- /dev/null +++ b/App/ViewModels/InkjetRecordsViewModels.asp @@ -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 + +%> diff --git a/App/ViewModels/KitViewModels.asp b/App/ViewModels/KitViewModels.asp index 6766e88..c6634fd 100644 --- a/App/ViewModels/KitViewModels.asp +++ b/App/ViewModels/KitViewModels.asp @@ -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 diff --git a/App/Views/Home/Index.asp b/App/Views/Home/Index.asp index e7c87b5..853fdaf 100644 --- a/App/Views/Home/Index.asp +++ b/App/Views/Home/Index.asp @@ -11,7 +11,7 @@ Switchboard <%= 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")) %> Create InkjetRecords + +<%= HTML.FormTag("InkjetRecords", "CreatePost", empty, empty) %> +<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("InkjetRecordsCreateForm")) %> +
Are you sure you want to delete this InkjetRecords?
+ +<%= HTML.FormTag("InkjetRecords", "DeletePost", empty, Array("class", "form-horizontal")) %> +<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("InkjetRecordsDeleteForm")) %> +<%= HTML.Hidden("Id", Model.InkjetRecords.ID) %> ++ | 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 | ++ |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ <%= HTML.LinkToExt("", "InkjetRecords", "Edit", Array("Id", InkjetRecords.ID), Array("class", "btn btn-primary")) %> + | +<% = H(InkjetRecords.ID) %> | +<% = H(InkjetRecords.KitID) %> | +<% = H(InkjetRecords.VOTERID) %> | +<% = H(InkjetRecords.LASTNAME) %> | +<% = H(InkjetRecords.FIRSTNAME) %> | +<% = H(InkjetRecords.MIDDLENAME) %> | +<% = H(InkjetRecords.SUFFIX) %> | +<% = H(InkjetRecords.PRECINCT) %> | +<% = H(InkjetRecords.ADDRESS1) %> | +<% = H(InkjetRecords.ADDRESS2) %> | +<% = H(InkjetRecords.ADDRESS3) %> | +<% = H(InkjetRecords.ADDRESS4) %> | +<% = H(InkjetRecords.ADDRESS5) %> | +<% = H(InkjetRecords.APPSENT) %> | +<% = H(InkjetRecords.APPRETURNED) %> | +<% = H(InkjetRecords.BALSENT) %> | +<% = H(InkjetRecords.BALRETURNED) %> | +<% = H(InkjetRecords.CountingBoard) %> | +<% = H(InkjetRecords.UOCAVASTATUS) %> | +<% = H(InkjetRecords.EMAILADDRESS) %> | +<% = H(InkjetRecords.PHONENUMBER) %> | +<% = H(InkjetRecords.BALLOT_NUMBER) %> | +<% = H(InkjetRecords.CassADDRESS1) %> | +<% = H(InkjetRecords.CassADDRESS2) %> | +<% = H(InkjetRecords.CassADDRESS3) %> | +<% = H(InkjetRecords.CassADDRESS4) %> | +<% = H(InkjetRecords.CassADDRESS5) %> | +