diff --git a/App/DomainModels/KitRepository.asp b/App/DomainModels/KitRepository.asp index 96b64f9..674ca5b 100644 --- a/App/DomainModels/KitRepository.asp +++ b/App/DomainModels/KitRepository.asp @@ -20,10 +20,11 @@ Class KitModel_Class Public Status '106 Public OutboundSTID '106 Public InboundSTID '106 + Public OfficeCopiesAmount Private Sub Class_Initialize 'ValidateExitsts Me, "","" - Class_Get_Properties = Array("ID, JobNumber, Jcode, CreatedOn, LabelsPrinted, ExportedToSnailWorks, InkJetJob, JobType, Filename, Cass, Status, OutboundSTID, InboundSTID") + Class_Get_Properties = Array("ID, JobNumber, Jcode, CreatedOn, LabelsPrinted, ExportedToSnailWorks, InkJetJob, JobType, Filename, Cass, Status, OutboundSTID, InboundSTID, OfficeCopiesAmount") End Sub End CLass @@ -47,10 +48,11 @@ Class IndexKitModel_Class Public Status Public OutboundSTID Public InboundSTID + Public OfficeCopiesAmount Private Sub Class_Initialize 'ValidateExitsts Me, "","" - Class_Get_Properties = Array("ID, JobNumber,Jcode, Jurisdiction,LabelCount,CreatedOn,LabelsPrinted,ExportedToSnailWorks,InkJetJob,JobType,Filename,Cass,Status,OutboundSTID,InboundSTID") + Class_Get_Properties = Array("ID, JobNumber,Jcode, Jurisdiction,LabelCount,CreatedOn,LabelsPrinted,ExportedToSnailWorks,InkJetJob,JobType,Filename,Cass,Status,OutboundSTID,InboundSTID,OfficeCopiesAmount") End Sub End Class @@ -65,7 +67,7 @@ Class KitRepository_Class dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber],Kit.JCode, " &_ "Jurisdiction.Name As Jurisdiction," &_ "(SELECT COUNT(*) From InkjetRecords Where KitId = Kit.ID)" &_ - " As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[InkJetJob],[JobType],[Filename],[Cass],[Status],[OutboundSTID],[InboundSTID] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode Where Kit.JobType = 'Purple Envelopes';" + " As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[InkJetJob],[JobType],[Filename],[Cass],[Status],[OutboundSTID],[InboundSTID],[OfficeCopiesAmount] 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) @@ -133,7 +135,7 @@ Class KitRepository_Class dim sql : sql = "SELECT Kit.ID,Kit.JobNumber as [JobNumber],Kit.JCode, " &_ "Jurisdiction.Name As Jurisdiction," &_ "(SELECT COUNT(*) From InkjetRecords Where KitID = Kit.ID)" &_ - " As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[JobType],[Status],[OutboundSTID],[InboundSTID] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode " &_ + " As [LabelCount],[CreatedOn],[LabelsPrinted],[ExportedToSnailWorks],[JobType],[Status],[OutboundSTID],[InboundSTID],[OfficeCopiesAmount] FROM Kit INNER JOIN Jurisdiction ON Kit.Jcode = Jurisdiction.JCode " &_ "WHERE ID = ? " dim rs : set rs = DAL.Query(sql,ID) @@ -148,7 +150,7 @@ Class KitRepository_Class Public Function FindByID(ID) - dim sql : sql = "Select [ID], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID] FROM [Kit] WHERE ID = ?" + dim sql : sql = "Select [ID], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID], [OfficeCopiesAmount] FROM [Kit] WHERE ID = ?" dim rs : set rs = DAL.Query(sql,ID) If rs.EOF then Err.Raise 1, "KitRepository_Class", KitNotFoundException("ID", ID) @@ -162,7 +164,7 @@ Class KitRepository_Class End Function Public Function Find(where_kvarray, order_string_or_array) - dim sql : sql = "Select [ID], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID] FROM [Kit]" + dim sql : sql = "Select [ID], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID], [OfficeCopiesAmount] FROM [Kit]" If Not IsEmpty(where_kvarray) then sql = sql & " WHERE " @@ -195,7 +197,7 @@ Class KitRepository_Class 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], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID] FROM [Kit]" + dim sql : sql = "Select [ID], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID], [OfficeCopiesAmount] FROM [Kit]" If Not IsEmpty(where_kvarray) then sql = sql & " WHERE " @@ -237,7 +239,7 @@ Class KitRepository_Class 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], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID] FROM [Kit]" + dim sql : sql = "Select [ID], [JobNumber], [Jcode], [CreatedOn], [LabelsPrinted], [ExportedToSnailWorks], [InkJetJob], [JobType], [Filename], [Cass], [Status], [OutboundSTID], [InboundSTID], [OfficeCopiesAmount] FROM [Kit]" If Not IsEmpty(where_kvarray) then sql = sql & " WHERE " @@ -332,7 +334,8 @@ Public Sub Update(model) "[Cass] = ?," &_ "[Status] = ?," &_ "[OutboundSTID] = ?," &_ - "[InboundSTID] = ?" &_ + "[InboundSTID] = ?," &_ + "[OfficeCopiesAmount] = ?" &_ " WHERE [ID] = ?" DAL.Execute sql, Array(model.JobNumber, _ @@ -347,6 +350,7 @@ Public Sub Update(model) model.Status, _ model.OutboundSTID, _ model.InboundSTID, _ + model.OfficeCopiesAmount, _ model.ID) End Sub diff --git a/App/Views/Kit/SwitchBoardPurpleEnvelopeEdit.asp b/App/Views/Kit/SwitchBoardPurpleEnvelopeEdit.asp index a0cae38..c430b2c 100644 --- a/App/Views/Kit/SwitchBoardPurpleEnvelopeEdit.asp +++ b/App/Views/Kit/SwitchBoardPurpleEnvelopeEdit.asp @@ -24,6 +24,8 @@

<%= HTML.Button("submit", " Save", "btn-primary") %>

+ <% ELSE %> +

Office Copies Amount : <%= Model.Kit.OfficeCopiesAmount %>

<% END IF %> diff --git a/App/Views/Kit/edit.asp b/App/Views/Kit/edit.asp index 7aa3470..927ce8d 100644 --- a/App/Views/Kit/edit.asp +++ b/App/Views/Kit/edit.asp @@ -98,6 +98,14 @@ +
+
+
+ + <%= HTML.TextboxExt("OfficeCopiesAmount", Model.Kit.OfficeCopiesAmount, Array("class", "form-control")) %> +
+
+

<% = HTML.Button("submit", " Save", "btn-primary") %> diff --git a/App/Views/Kit/index.asp b/App/Views/Kit/index.asp index 2e1253e..5b9c07c 100644 --- a/App/Views/Kit/index.asp +++ b/App/Views/Kit/index.asp @@ -37,6 +37,7 @@ Status OutboundSTID InboundSTID + Office Copies Amount @@ -62,6 +63,7 @@ <% = H(Kit.Status) %> <% = H(Kit.OutboundSTID) %> <% = H(Kit.InboundSTID) %> + <% = H(Kit.OfficeCopiesAmount) %> <% Wend %>