CreateCustomOfficeCopyScaffold
uz master
pirms 2 mēnešiem
@@ -0,0 +1,129 @@ | |||
<% Option Explicit %> | |||
<!--#include file="../../include_all.asp"--> | |||
<!--#include file="../../ViewModels/CustomOfficeCopyJobViewModels.asp"--> | |||
<% | |||
Class CustomOfficeCopyJobController | |||
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 = "CustomOfficeCopyJob" | |||
set Model.CustomOfficeCopyJob = CustomOfficeCopyJobRepository.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/CustomOfficeCopyJob/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 = "CustomOfficeCopyJob" | |||
set Model.CustomOfficeCopyJob = CustomOfficeCopyJobRepository.SearchTablePaged(Array("ID","%" & searchValue & "%","Jcode","%" & searchValue & "%","Precinct","%" & searchValue & "%","StartingBallotNumber","%" & searchValue & "%","Amount","%" & searchValue & "%","Status","%" & searchValue & "%","Donedate","%" & 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/CustomOfficeCopyJob/Index.asp"--> <% | |||
End Sub | |||
Public Sub Edit | |||
dim id : id = Request.QueryString("Id") | |||
set Model = new Edit_ViewModel_Class | |||
set Model.CustomOfficeCopyJob = CustomOfficeCopyJobRepository.FindByID(id) | |||
Model.Title = "Edit CustomOfficeCopyJob" | |||
HTMLSecurity.SetAntiCSRFToken "CustomOfficeCopyJobEditForm" | |||
%> <!--#include file="../../Views/CustomOfficeCopyJob/Edit.asp"--> <% | |||
Flash.Success = "CustomOfficeCopyJob Updated." | |||
End Sub | |||
Public Sub EditPost | |||
MVC.RequirePost | |||
HTMLSecurity.OnInvalidAntiCsrfTokenRedirectToActionExt "CustomOfficeCopyJobEditForm", Request.Form("nonce"), "Edit", Array("Id", Request.Form("Id")) | |||
dim ID : ID = Request.Form("Id") | |||
dim model : set model = CustomOfficeCopyJobRepository.FindByID(ID) | |||
set model = Automapper.AutoMap(Request.Form, model) | |||
'model.Validate | |||
'If model.Validator.HasErrors then | |||
FormCache.SerializeForm "EditCustomOfficeCopyJob", Request.Form | |||
' Flash.Errors = model.Validator.Errors | |||
' MVC.RedirectToActionExt "Edit", Array("Id",ID) | |||
'Else | |||
CustomOfficeCopyJobRepository.Update model | |||
FormCache.ClearForm "EditCustomOfficeCopyJob" | |||
Flash.Success = "CustomOfficeCopyJob updated." | |||
MVC.RedirectToAction "Index" | |||
'End If | |||
End Sub | |||
Public Sub Create | |||
dim form_params : set form_params = FormCache.DeserializeForm("NewCustomOfficeCopyJob") | |||
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 "CustomOfficeCopyJobCreateForm" | |||
%> <!--#include file="../../Views/CustomOfficeCopyJob/Create.asp"--> <% | |||
End Sub | |||
Public Sub CreatePost | |||
MVC.RequirePost | |||
HtmlSecurity.OnInvalidAntiCSRFTokenRedirectToAction "CustomOfficeCopyJobCreateForm", Request.Form("nonce"), "Create" | |||
dim new_CustomOfficeCopyJob_model : set new_CustomOfficeCopyJob_model = Automapper.AutoMap(Request.Form, new CustomOfficeCopyJobModel_Class) | |||
'new_CustomOfficeCopyJob_model.Validator.Validate | |||
'If new_CustomOfficeCopyJob_model.Validator.HasErrors then | |||
' FormCache.SerializeForm "NewCustomOfficeCopyJob", Request.Form | |||
' Flash.Errors = new_CustomOfficeCopyJob_model.Validator.Errors | |||
' MVC.RedirectToAction "Create" | |||
'Else | |||
CustomOfficeCopyJobRepository.AddNew new_CustomOfficeCopyJob_model | |||
' FormCache.ClearForm "NewCustomOfficeCopyJob" | |||
Flash.Success = "CustomOfficeCopyJob 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.CustomOfficeCopyJob = CustomOfficeCopyJobRepository.FindByID(id) | |||
Model.Title = "Delete CustomOfficeCopyJob" | |||
HTMLSecurity.SetAntiCSRFToken "CustomOfficeCopyJobDeleteForm" | |||
%> <!--#include file="../../Views/CustomOfficeCopyJob/Delete.asp"--> <% | |||
End Sub | |||
Public Sub DeletePost | |||
MVC.RequirePost | |||
HtmlSecurity.OnInvalidAntiCSRFTokenRedirectToAction "CustomOfficeCopyJobDeleteForm", Request.Form("nonce"), "Create" | |||
dim id : id = Request.Form("Id") | |||
CustomOfficeCopyJobRepository.Delete id | |||
Flash.Success = "CustomOfficeCopyJob deleted." | |||
MVC.RedirectToAction "Index" | |||
End Sub | |||
End Class | |||
MVC.Dispatch | |||
%> |
@@ -0,0 +1,240 @@ | |||
<% | |||
'======================================================================================================================= | |||
' CustomOfficeCopyJob Model | |||
'======================================================================================================================= | |||
Class CustomOfficeCopyJobModel_Class | |||
Public Validator | |||
Public Class_Get_Properties | |||
Public ID '90 | |||
Public Jcode '106 | |||
Public Precinct '106 | |||
Public StartingBallotNumber '122 | |||
Public Amount '122 | |||
Public Status '106 | |||
Public Donedate '122 | |||
Private Sub Class_Initialize | |||
'ValidateExitsts Me, "","" | |||
Class_Get_Properties = Array("ID, Jcode, Precinct, StartingBallotNumber, Amount, Status, Donedate") | |||
End Sub | |||
End CLass | |||
'======================================================================================================================= | |||
' CustomOfficeCopyJob Repository | |||
'======================================================================================================================= | |||
Class CustomOfficeCopyJobRepository_Class | |||
Public Function FindByID(ID) | |||
dim sql : sql = "Select [ID], [Jcode], [Precinct], [StartingBallotNumber], [Amount], [Status], [Donedate] FROM [CustomOfficeCopyJob] WHERE ID = ?" | |||
dim rs : set rs = DAL.Query(sql,ID) | |||
If rs.EOF then | |||
Err.Raise 1, "CustomOfficeCopyJobRepository_Class", CustomOfficeCopyJobNotFoundException("ID", ID) | |||
Else | |||
set FindByID = Automapper.AutoMap(rs,"CustomOfficeCopyJobModel_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], [Jcode], [Precinct], [StartingBallotNumber], [Amount], [Status], [Donedate] FROM [CustomOfficeCopyJob]" | |||
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 = CustomOfficeCopyJobList(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], [Jcode], [Precinct], [StartingBallotNumber], [Amount], [Status], [Donedate] FROM [CustomOfficeCopyJob]" | |||
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 = PagedCustomOfficeCopyJobList(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], [Jcode], [Precinct], [StartingBallotNumber], [Amount], [Status], [Donedate] FROM [CustomOfficeCopyJob]" | |||
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 = PagedCustomOfficeCopyJobList(rs, per_page) | |||
Destroy rs | |||
End Function | |||
Private Function PagedCustomOfficeCopyJobList(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 CustomOfficeCopyJobModel_Class) | |||
x = x +1 | |||
rs.MoveNext | |||
Loop | |||
set PagedCustomOfficeCopyJobList = list | |||
End Function | |||
Private Function CustomOfficeCopyJobNotFoundException(ByVal field_name, ByVal field_val) | |||
CustomOfficeCopyJobNotFoundException = "CustomOfficeCopyJob was not found with " & field_name & " of '" & field_val & "'." | |||
End Function | |||
Private Function CustomOfficeCopyJobList(rs) | |||
dim list : set list = new LinkedList_Class | |||
dim model | |||
Do until rs.EOF | |||
set model = new CustomOfficeCopyJobModel_Class | |||
list.Push Automapper.AutoMap(rs, model) | |||
rs.MoveNext | |||
Loop | |||
set CustomOfficeCopyJobList = list | |||
End Function | |||
Public Sub AddNew(ByRef model) | |||
dim sql : sql = "INSERT INTO [CustomOfficeCopyJob] (" &_ | |||
"[Jcode]," &_ | |||
"[Precinct]," &_ | |||
"[StartingBallotNumber]," &_ | |||
"[Amount]," &_ | |||
"[Status])" &_ | |||
"VALUES (?,?,?,?,?)" | |||
DAL.Execute sql, Array(model.Jcode, _ | |||
model.Precinct, _ | |||
model.StartingBallotNumber, _ | |||
model.Amount, _ | |||
"Ready") | |||
sql = "SELECT TOP 1 ID FROM [CustomOfficeCopyJob] 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 [CustomOfficeCopyJob] SET [Jcode] = ?," &_ | |||
"[Precinct] = ?," &_ | |||
"[StartingBallotNumber] = ?," &_ | |||
"[Amount] = ?," &_ | |||
"[Status] = ?," &_ | |||
"[Donedate] = ?" &_ | |||
" WHERE [ID] = ?" | |||
DAL.Execute sql, Array(model.Jcode, _ | |||
model.Precinct, _ | |||
model.StartingBallotNumber, _ | |||
model.Amount, _ | |||
model.Status, _ | |||
model.Donedate, _ | |||
model.ID) | |||
End Sub | |||
Public Sub Delete(id) | |||
dim sql : sql = "DELETE FROM [CustomOfficeCopyJob] WHERE [ID] = ?" | |||
DAL.Execute sql, id | |||
End Sub | |||
End Class | |||
dim CustomOfficeCopyJobRepository__Singleton | |||
Function CustomOfficeCopyJobRepository() | |||
If IsEmpty(CustomOfficeCopyJobRepository__Singleton) then | |||
set CustomOfficeCopyJobRepository__Singleton = new CustomOfficeCopyJobRepository_Class | |||
End If | |||
set CustomOfficeCopyJobRepository = CustomOfficeCopyJobRepository__Singleton | |||
End Function | |||
%> |
@@ -23,7 +23,7 @@ Init | |||
fixedTableName = Replace(rs("TABLE_NAME")," ","_") | |||
tableName = rs("TABLE_NAME") | |||
'If tableName <> "meta_migrations" Then | |||
If tableName <> "meta_migrations" AND tableName = "InkjetRecords" Then | |||
If tableName <> "meta_migrations" AND tableName = "CustomOfficeCopyJob" Then | |||
debug.WriteLine(tableName) | |||
If Not fso.FolderExists(ScriptDirectory()& "Controllers\"& fixedTableName) Then fso.CreateFolder(ScriptDirectory()& "Controllers\"& fixedTableName) | |||
@@ -0,0 +1,32 @@ | |||
<% | |||
Class PagedIndex_ViewModel_Class | |||
Public Title | |||
Public CustomOfficeCopyJob | |||
Public CurrentPageNumber | |||
Public PageSize | |||
Public PageCount | |||
Public RecordCount | |||
End Class | |||
Class Edit_ViewModel_Class | |||
Public Title | |||
Public CustomOfficeCopyJob | |||
End Class | |||
Class Create_ViewModel_Class | |||
Public Jcode | |||
Public Precinct | |||
Public StartingBallotNumber | |||
Public Amount | |||
Public Status | |||
Public Donedate | |||
End Class | |||
Class Delete_ViewModel_Class | |||
Public Title | |||
Public CustomOfficeCopyJob | |||
End Class | |||
%> |
@@ -0,0 +1,46 @@ | |||
<h2>Create Custom Office Copy Job</h2> | |||
<%= HTML.FormTag("CustomOfficeCopyJob", "CreatePost", empty, empty) %> | |||
<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("CustomOfficeCopyJobCreateForm")) %> | |||
<hr /> | |||
<div class="form-group"> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Jcode">Jcode</label> | |||
<%= HTML.TextboxExt("Jcode", Model.Jcode, 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="StartingBallotNumber">StartingBallotNumber</label> | |||
<%= HTML.TextboxExt("StartingBallotNumber", Model.StartingBallotNumber, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Amount">Amount</label> | |||
<%= HTML.TextboxExt("Amount", Model.Amount, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<p></P> | |||
<%= HTML.Button("submit", "<i class='glyphicon glyphicon-ok'></i> Create", "btn-primary") %> | |||
| |||
<%= HTML.LinkToExt("<i class='glyphicon glyphicon-remove'></i> Cancel", "CustomOfficeCopyJob", "Index", empty, Array("class", "btn btn-default")) %> | |||
</div> | |||
</form> |
@@ -0,0 +1,63 @@ | |||
<h2><%= H(Model.Title) %></h2> | |||
<p class="alert alert-danger">Are you sure you want to delete this CustomOfficeCopyJob?</p> | |||
<%= HTML.FormTag("CustomOfficeCopyJob", "DeletePost", empty, Array("class", "form-horizontal")) %> | |||
<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("CustomOfficeCopyJobDeleteForm")) %> | |||
<%= HTML.Hidden("Id", Model.CustomOfficeCopyJob.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", "CustomOfficeCopyJob", "Index", empty, Array("class", "btn btn-success")) %> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Jcode">Jcode</label> | |||
<%= HTML.TextboxExt("Jcode", Model.CustomOfficeCopyJob.Jcode, 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.CustomOfficeCopyJob.Precinct, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="StartingBallotNumber">StartingBallotNumber</label> | |||
<%= HTML.TextboxExt("StartingBallotNumber", Model.CustomOfficeCopyJob.StartingBallotNumber, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Amount">Amount</label> | |||
<%= HTML.TextboxExt("Amount", Model.CustomOfficeCopyJob.Amount, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Status">Status</label> | |||
<%= HTML.TextboxExt("Status", Model.CustomOfficeCopyJob.Status, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Donedate">Donedate</label> | |||
<%= HTML.TextboxExt("Donedate", Model.CustomOfficeCopyJob.Donedate, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</form> |
@@ -0,0 +1,61 @@ | |||
<h2><%= H(Model.Title) %></h2> | |||
<%= HTML.FormTag("CustomOfficeCopyJob", "EditPost", empty, empty) %> | |||
<%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("CustomOfficeCopyJobEditForm")) %> | |||
<%= HTML.Hidden("Id", Model.CustomOfficeCopyJob.ID) %> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Jcode">Jcode</label> | |||
<%= HTML.TextboxExt("Jcode", Model.CustomOfficeCopyJob.Jcode, 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.CustomOfficeCopyJob.Precinct, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="StartingBallotNumber">StartingBallotNumber</label> | |||
<%= HTML.TextboxExt("StartingBallotNumber", Model.CustomOfficeCopyJob.StartingBallotNumber, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Amount">Amount</label> | |||
<%= HTML.TextboxExt("Amount", Model.CustomOfficeCopyJob.Amount, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Status">Status</label> | |||
<%= HTML.TextboxExt("Status", Model.CustomOfficeCopyJob.Status, Array("class", "form-control")) %> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="row"> | |||
<div class="col-md-4"> | |||
<div class="form-group"> | |||
<label for="Donedate">Donedate</label> | |||
<%= HTML.TextboxExt("Donedate", Model.CustomOfficeCopyJob.Donedate, 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", "CustomOfficeCopyJob", "Delete", Array("id", Model.CustomOfficeCopyJob.ID), Array("class", "btn btn-danger")) %> | |||
| |||
<%= HTML.LinkToExt("Cancel", "CustomOfficeCopyJob", "Index", empty, Array("class", "btn btn-default")) %> | |||
</div> | |||
</form> |
@@ -0,0 +1,81 @@ | |||
<h2><%= H(Model.Title) %></h2> | |||
<div class="row"> | |||
<div class="col-md-8 col-sm-8 col-xs-12"> | |||
<%= H(Model.RecordCount) %> CustomOfficeCopyJob found. Showing <%= H(Model.PageSize) %> records per page. | |||
<%= HTML.LinkToExt("<i class='bi bi-plus-square-fill'></i> New","CustomOfficeCopyJob", "Create", empty, Array("class", "btn btn-xs btn-primary")) %> | |||
</div> | |||
<div class="col-md-4 col-sm-4 col-xs-12"> | |||
<%= HTML.FormTag("CustomOfficeCopyJob", "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="CustomOfficeCopyJob" class="table table-striped"> | |||
<thead> | |||
<tr> | |||
<th></th> | |||
<th style="text-align: left">ID</th> | |||
<th style="text-align: left">Jcode</th> | |||
<th style="text-align: left">Precinct</th> | |||
<th style="text-align: left">StartingBallotNumber</th> | |||
<th style="text-align: left">Amount</th> | |||
<th style="text-align: left">Status</th> | |||
<th style="text-align: left">Donedate</th> | |||
<th></th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<% dim it : set it = Model.CustomOfficeCopyJob.Iterator %> | |||
<% dim CustomOfficeCopyJob %> | |||
<% While it.HasNext %> | |||
<% set CustomOfficeCopyJob = it.GetNext() %> | |||
<tr> | |||
<td> | |||
<%= HTML.LinkToExt("<i class='bi bi-search'></i>", "CustomOfficeCopyJob", "Edit", Array("Id", CustomOfficeCopyJob.ID), Array("class", "btn btn-primary")) %> | |||
</td> | |||
<td><% = H(CustomOfficeCopyJob.ID) %></td> | |||
<td><% = H(CustomOfficeCopyJob.Jcode) %></td> | |||
<td><% = H(CustomOfficeCopyJob.Precinct) %></td> | |||
<td><% = H(CustomOfficeCopyJob.StartingBallotNumber) %></td> | |||
<td><% = H(CustomOfficeCopyJob.Amount) %></td> | |||
<td><% = H(CustomOfficeCopyJob.Status) %></td> | |||
<td><% = H(CustomOfficeCopyJob.Donedate) %></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> |
@@ -12,7 +12,7 @@ | |||
<%= 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","SwitchBoardPurpleEnvelopsIndex",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
<%= Html.LinkTOExt("Custom Office Copies","Kit","SwitchBoardPurpleEnvelopsIndex",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
<%= Html.LinkTOExt("Custom Office Copies","CustomOfficeCopyJob","Index",empty,Array("Class","list-group-item list-group-item-action")) %> | |||
</div> | |||
</div> | |||
</div | |||
@@ -30,6 +30,7 @@ | |||
<li><%= Html.LinkTOExt("Settings","Settings","Index",empty,Array("Class","dropdown-item")) %></li> | |||
<li><%= Html.LinkTOExt("InkjetRecords","InkjetRecords","Index",empty,Array("Class","dropdown-item")) %></li> | |||
<li><%= Html.LinkTOExt("Import Jurisdiction File","Jurisdiction","Import",empty,Array("Class","dropdown-item")) %></li> | |||
<li><%= Html.LinkTOExt("CustomOfficeCopyJob","CustomOfficeCopyJob","Index",empty,Array("Class","nav-link")) %></li> | |||
<!--nav bar admin placeholder--> | |||
</ul> | |||
</li> | |||
@@ -60,3 +61,4 @@ | |||
@@ -1,10 +1,4 @@ | |||
<!--#include file="../MVC/lib.all.asp"--> | |||
<!--#include file="DAL/lib.DAL.asp"--> | |||
<!--#include file="app.Config.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/ContactsRepository.asp"--> | |||
<!--#include file="DomainModels/SnailWorksRepository.asp"--> | |||
<!--#include file="DomainModels/CustomOfficeCopyJobRepository.asp"--> |
Powered by TurnKey Linux.