Browse Source

more goodies

pull/7/head
Daniel Covington 7 months ago
parent
commit
4508b9d698
4 changed files with 12 additions and 8 deletions
  1. +10
    -7
      App/DomainModels/KitRepository.asp
  2. +2
    -1
      App/Views/Home/Index.asp
  3. BIN
      Dependancies/reportmanX64.ocx
  4. BIN
      Dependancies/reportmanX86.ocx

+ 10
- 7
App/DomainModels/KitRepository.asp View File

@@ -29,10 +29,11 @@ Class IndexKitModel_Class
Public CreatedOn Public CreatedOn
Public LabelsPrinted Public LabelsPrinted
Public ExportedToSnailWorks Public ExportedToSnailWorks
Public JobType


Private Sub Class_Initialize Private Sub Class_Initialize
'ValidateExitsts Me, "","" 'ValidateExitsts Me, "",""
Class_Get_Properties = Array("ID, JobNumber, Jurisdiction,LabelCount,CreatedOn,LabelsPrinted,ExportedToSnailWorks")
Class_Get_Properties = Array("ID, JobNumber, Jurisdiction,LabelCount,CreatedOn,LabelsPrinted,ExportedToSnailWorks,JobType")
End Sub End Sub
End Class End Class


@@ -47,7 +48,7 @@ Class KitRepository_Class
dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber], " &_ dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber], " &_
"Jurisdiction.Name As Jurisdiction," &_ "Jurisdiction.Name As Jurisdiction," &_
"(SELECT COUNT(*) From KitLabels Where KitId = Kit.ID)" &_ "(SELECT COUNT(*) From KitLabels Where KitId = Kit.ID)" &_
" As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode;"
" As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[JobType] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode Where Kit.JobType Is Null or Kit.JobType = 'Labels';"


dim list : set list = new LinkedList_Class dim list : set list = new LinkedList_Class
dim rs : set rs = DAL.PagedQuery(sql, empty, per_page, page_num) dim rs : set rs = DAL.PagedQuery(sql, empty, per_page, page_num)
@@ -77,8 +78,8 @@ Class KitRepository_Class
dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber], " &_ dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber], " &_
"Jurisdiction.Name As Jurisdiction," &_ "Jurisdiction.Name As Jurisdiction," &_
"(SELECT COUNT(*) From KitLabels Where KitId = Kit.ID)" &_ "(SELECT COUNT(*) From KitLabels Where KitId = Kit.ID)" &_
" As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode " &_
"WHERE ID = ?"
" As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[JobType] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode " &_
"WHERE ID = ? AND Kit.JobType Is Null or Kit.JobType = 'Labels'"


dim rs : set rs = DAL.Query(sql,ID) dim rs : set rs = DAL.Query(sql,ID)
If rs.EOF then If rs.EOF then
@@ -252,10 +253,12 @@ Class KitRepository_Class
Public Sub AddNew(ByRef model) Public Sub AddNew(ByRef model)
dim sql : sql = "INSERT INTO [Kit] (" &_ dim sql : sql = "INSERT INTO [Kit] (" &_
"[JobNumber]," &_ "[JobNumber]," &_
"[Jcode])" &_
"VALUES (?,?)"
"[Jcode]," &_
"[CreatedOn]," &_
"[JobType])" &_
"VALUES (?,?,?,?)"
DAL.Execute sql, Array(model.JobNumber, _ DAL.Execute sql, Array(model.JobNumber, _
model.Jcode)
model.Jcode,Now(),"Labels")
sql = "SELECT TOP 1 ID FROM [Kit] ORDER BY ID DESC" sql = "SELECT TOP 1 ID FROM [Kit] ORDER BY ID DESC"
dim rs : set rs = DAL.Query(sql, empty) dim rs : set rs = DAL.Query(sql, empty)
model.ID = rs("ID") model.ID = rs("ID")


+ 2
- 1
App/Views/Home/Index.asp View File

@@ -10,7 +10,8 @@
<div class="list-group"> <div class="list-group">
<a href="#" class="list-group-item list-group-item-action active">Switchboard</a> <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("Create Kit","Home","CreateKit",empty,Array("Class","list-group-item list-group-item-action")) %>
<%= Html.LinkTOExt("View Current Kits","Kit","SwitchBoardIndex",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")) %>
</div> </div>
</div> </div>
</div </div


BIN
Dependancies/reportmanX64.ocx View File


BIN
Dependancies/reportmanX86.ocx View File


Loading…
Cancel
Save

Powered by TurnKey Linux.