|
@@ -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") |
|
|