| @@ -43,16 +43,13 @@ Class HomeController | |||||
| Public Sub Print | Public Sub Print | ||||
| Dim objAccess, objDB, objReport, objPrinter | Dim objAccess, objDB, objReport, objPrinter | ||||
| ' Create an instance of Access application | |||||
| Set objAccess = Server.CreateObject("Access.Application") | |||||
| set objDB = objAccess.OpenCurrentDatabase("F:\Development\Tracking_Kits\Data\webdata - Copy.mdb",0) | |||||
| set objDB = objAccess.DoCmd.OpenReport ("rptKitLables" ,0) | |||||
| objAccess.DoCmd.Close 3 | |||||
| 'Set objReport = objDB.DoCmd.OpenReport("KitLabels", 0) ' 2 represents acViewPreview | |||||
| 'objAccess.DoCmd.OutputTo 3,"rptKitLables",acFormatPDF, Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\test1.pdf",0 | |||||
| objAccess.Quit | |||||
| Set objAccess = Nothing | |||||
| dim blah:set blah = Server.CreateObject("ReportMan.ReportManX") | |||||
| blah.Preview = false | |||||
| blah.ShowProgress = false | |||||
| blah.ShowPrintDialog = false | |||||
| blah.Filename = "F:\Development\Tracking_Kits\Data\Label_Report.rep" | |||||
| blah.SaveToPdf "F:\Development\Tracking_Kits\Data\sample.pdf",1 | |||||
| End Sub | End Sub | ||||
| End Class | End Class | ||||
| @@ -0,0 +1,73 @@ | |||||
| <h2>Create Kit</h2> | |||||
| <div class="row"> | |||||
| <div class="col-md-8 col-sm-8 col-xs-12"> | |||||
| <%= H(Model.RecordCount) %> <%= Choice(Model.RecordCount >=2," Jurisdictions"," Jurisdiction") %> found. Showing <%= H(Model.PageSize) %> records per page. | |||||
| </div> | |||||
| <div class="col-md-4 col-sm-4 col-xs-12"> | |||||
| <%= HTML.FormTag("Home", "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="Jurisdiction" class="table table-striped"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th style="text-align: left">JCode</th> | |||||
| <th style="text-align: left">Name</th> | |||||
| <th style="text-align: left">Mailing_Address</th> | |||||
| <th style="text-align: left">CSZ</th> | |||||
| <th></th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tbody> | |||||
| <% dim it : set it = Model.Jurisdiction.Iterator %> | |||||
| <% dim Jurisdiction %> | |||||
| <% While it.HasNext %> | |||||
| <% set Jurisdiction = it.GetNext() %> | |||||
| <tr> | |||||
| <td><% = H(Jurisdiction.JCode) %></td> | |||||
| <td><% = H(Jurisdiction.Name) %></td> | |||||
| <td><% = H(Jurisdiction.Mailing_Address) %></td> | |||||
| <td><% = H(Jurisdiction.CSZ) %></td> | |||||
| <td> | |||||
| <%= HTML.LinkToExt("<i class='bi bi-play-btn'></i>", "Kit", "create", Array("Id", Jurisdiction.JCode), Array("class", "btn btn-primary")) %> | |||||
| </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> | |||||
| @@ -0,0 +1,70 @@ | |||||
| <h2><%= H(Model.Title & " " & Model.Kit.Jurisdiction) %></h2> | |||||
| <%= HTML.Hidden("nonce", HTMLSecurity.GetAntiCSRFToken("KitEditForm")) %> | |||||
| <%= HTML.Hidden("Id", Model.Kit.ID) %> | |||||
| <div class="row"> | |||||
| <div class="col-md-6"> | |||||
| <h2>Job Number: <%= Model.Kit.JobNumber %></h2> | |||||
| <p><strong>Jurisdiction:</strong> <%= Model.Kit.Jurisdiction %></p> | |||||
| <p><strong>Label Count:</strong> <%= Model.Kit.LabelCount %></p> | |||||
| <p><strong>Created On:</strong> <%= Model.Kit.CreatedOn %></p> | |||||
| <p><strong>Labels Printed On :</strong> <%= Model.Kit.LabelsPrinted %></p> | |||||
| <p><strong>Exported to SnailWorks On:</strong> <%= Model.Kit.ExportedToSnailWorks %></p> | |||||
| <button class="btn btn-primary" id="toggleChild">Show Label Records</button> | |||||
| </div> | |||||
| </div> | |||||
| <div class="row"> | |||||
| <div class="col-md-4"> | |||||
| <table id="KitLabels" class="table table-striped child-records" style="display:none"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th></th> | |||||
| <th style="text-align: left">ID</th> | |||||
| <th style="text-align: left">KitId</th> | |||||
| <th style="text-align: left">OutboundSerial</th> | |||||
| <th style="text-align: left">InBoundSerial</th> | |||||
| <th style="text-align: left">Outbound Font Encoded</th> | |||||
| <th style="text-align: left">InBound Font Encoded</th> | |||||
| <th style="text-align: left">OutboundIMBDigits</th> | |||||
| <th style="text-align: left">InBoundIMBDigits</th> | |||||
| <th style="text-align: left">OutboundIMB</th> | |||||
| <th style="text-align: left">InBoundIMB</th> | |||||
| <th></th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tbody> | |||||
| <% dim it : set it = Model.Labels.Iterator %> | |||||
| <% dim KitLabels %> | |||||
| <% While it.HasNext %> | |||||
| <% set KitLabels = it.GetNext() %> | |||||
| <tr> | |||||
| <td> | |||||
| <%= HTML.LinkToExt("<i class='bi bi-search'></i>", "KitLabels", "Edit", Array("Id", KitLabels.ID), Array("class", "btn btn-primary")) %> | |||||
| </td> | |||||
| <td><% = H(KitLabels.ID) %></td> | |||||
| <td><% = H(KitLabels.KitId) %></td> | |||||
| <td><% = H(KitLabels.OutboundSerial) %></td> | |||||
| <td><% = H(KitLabels.InBoundSerial) %></td> | |||||
| <td><% = H(KitLabels.OutboundIMB) %></td> | |||||
| <td><% = H(KitLabels.InBoundIMB) %></td> | |||||
| <td><% = H(KitLabels.OutboundIMBDigits) %></td> | |||||
| <td><% = H(KitLabels.InBoundIMBDigits) %></td> | |||||
| <td><img src='data:image/png;base64, <% = KitLabels.OutboundIMBPNG%>' alt='Barcode'</td> | |||||
| <td><img src='data:image/png;base64, <% = KitLabels.INBOUNDIMBPNG %>' alt='Barcode'</td> | |||||
| </tr> | |||||
| <% Wend %> | |||||
| </tbody> | |||||
| </table> | |||||
| </div> | |||||
| </div> | |||||
| <script> | |||||
| document.getElementById('toggleChild').addEventListener('click', function() { | |||||
| var childRecords = document.querySelector('.child-records'); | |||||
| if (childRecords.style.display === 'none') { | |||||
| childRecords.style.display = 'block'; | |||||
| this.textContent = 'Hide Label Records'; | |||||
| } else { | |||||
| childRecords.style.display = 'none'; | |||||
| this.textContent = 'Show Label Records'; | |||||
| } | |||||
| }); | |||||
| </script> | |||||
| @@ -0,0 +1,78 @@ | |||||
| <h2><%= H(Model.Title) %></h2> | |||||
| <div class="row"> | |||||
| <div class="col-md-8 col-sm-8 col-xs-12"> | |||||
| <%= H(Model.RecordCount) %> Kit found. Showing <%= H(Model.PageSize) %> records per page. | |||||
| <%'= HTML.LinkToExt("<i class='bi bi-plus-square-fill'></i> New","Kit", "Create", empty, Array("class", "btn btn-xs btn-primary")) %> | |||||
| </div> | |||||
| <div class="col-md-4 col-sm-4 col-xs-12"> | |||||
| <%= HTML.FormTag("Kit", "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="Kit" class="table table-striped"> | |||||
| <thead> | |||||
| <tr> | |||||
| <th></th> | |||||
| <th style="text-align: left">Job Number</th> | |||||
| <th style="text-align: left">Jurisdiction</th> | |||||
| <th style="text-align: left">Number of Labels</th> | |||||
| <th style="text-align: left">Created On</th> | |||||
| <th style="text-align: left">Label Print Date</th> | |||||
| <th style="text-align: left">SnailWorks Export Date</th> | |||||
| </tr> | |||||
| </thead> | |||||
| <tbody> | |||||
| <% dim it : set it = Model.Kit.Iterator %> | |||||
| <% dim Kit %> | |||||
| <% While it.HasNext %> | |||||
| <% set Kit = it.GetNext() %> | |||||
| <tr> | |||||
| <td> | |||||
| <%= HTML.LinkToExt("<i class='bi bi-search'></i>", "Kit", "SwitchBoardEdit", Array("Id", Kit.ID), Array("class", "btn btn-primary")) %> | |||||
| </td> | |||||
| <td><% = H(Kit.JobNumber) %></td> | |||||
| <td><% = H(Kit.Jurisdiction) %></td> | |||||
| <td><% = H(Kit.LabelCount) %></td> | |||||
| <td><% = H(Kit.CreatedOn) %></td> | |||||
| <td><% = H(Kit.LabelsPrinted) %></td> | |||||
| <td><% = H(Kit.ExportedToSnailWorks) %></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> | |||||
| @@ -0,0 +1,24 @@ | |||||
| <% | |||||
| Class Migration_06_Alter_Kit_Table | |||||
| Public Migration | |||||
| Public Sub Up | |||||
| Migration.Do "ALTER TABLE [Kit] " &_ | |||||
| "ADD CreatedOn DATETIME;" | |||||
| Migration.Do "ALTER TABLE [Kit] " &_ | |||||
| "ADD LabelsPrinted DATETIME;" | |||||
| Migration.Do "ALTER TABLE [Kit] " &_ | |||||
| "ADD ExportedToSnailWorks DATETIME;" | |||||
| End Sub | |||||
| Public Sub Down | |||||
| Migration.Do "ALTER TABLE [Kit] " &_ | |||||
| "DROP COLUMN CreatedOn;" | |||||
| Migration.Do "ALTER TABLE [Kit] " &_ | |||||
| "DROP COLUMN LabelsPrinted;" | |||||
| Migration.Do "ALTER TABLE [Kit] " &_ | |||||
| "DROP COLUMN ExportedToSnailWorks;" | |||||
| End Sub | |||||
| End Class | |||||
| Migrations.Add "Migration_06_Alter_Kit_Table" | |||||
| %> | |||||
Powered by TurnKey Linux.