diff --git a/App/DomainModels/KitRepository.asp b/App/DomainModels/KitRepository.asp index 2f3a4af..acf510d 100644 --- a/App/DomainModels/KitRepository.asp +++ b/App/DomainModels/KitRepository.asp @@ -29,10 +29,11 @@ Class IndexKitModel_Class Public CreatedOn Public LabelsPrinted Public ExportedToSnailWorks + Public JobType Private Sub Class_Initialize '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 Class @@ -47,7 +48,7 @@ Class KitRepository_Class 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] 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 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], " &_ "Jurisdiction.Name As Jurisdiction," &_ "(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) If rs.EOF then @@ -252,10 +253,12 @@ Class KitRepository_Class Public Sub AddNew(ByRef model) dim sql : sql = "INSERT INTO [Kit] (" &_ "[JobNumber]," &_ - "[Jcode])" &_ - "VALUES (?,?)" + "[Jcode]," &_ + "[CreatedOn]," &_ + "[JobType])" &_ + "VALUES (?,?,?,?)" DAL.Execute sql, Array(model.JobNumber, _ - model.Jcode) + model.Jcode,Now(),"Labels") sql = "SELECT TOP 1 ID FROM [Kit] ORDER BY ID DESC" dim rs : set rs = DAL.Query(sql, empty) model.ID = rs("ID") diff --git a/App/Views/Home/Index.asp b/App/Views/Home/Index.asp index 3f72b12..e7c87b5 100644 --- a/App/Views/Home/Index.asp +++ b/App/Views/Home/Index.asp @@ -10,7 +10,8 @@