You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

8 月之前
8 月之前
8 月之前
7 月之前
8 月之前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <% Option Explicit %>
  2. <!--#include file="../../include_all.asp"-->
  3. <!--#include file="../../ViewModels/JurisdictionViewModels.asp"-->
  4. <%
  5. dim Model
  6. Class HomeController
  7. Public Sub Index
  8. %> <!--#include file="../../Views/Home/Index.asp"--> <%
  9. End Sub
  10. Public Sub CreateKit
  11. dim page_size : page_size = 10
  12. dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1)
  13. dim page_count, record_count
  14. set Model = new PagedIndex_ViewModel_Class
  15. Model.Title = "Create Kit"
  16. set Model.Jurisdiction = JurisdictionRepository.FindPaged(empty, "JCode", page_size, page_num, page_count, record_count)
  17. Model.CurrentPageNumber = page_num
  18. Model.PageSize = page_size
  19. Model.PageCount = page_count
  20. Model.RecordCount = record_count
  21. %> <!--#include file="../../Views/Home/CreateTrackingKit.asp"--> <%
  22. End Sub
  23. Public Sub Search
  24. dim searchValue:searchValue = Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q"))
  25. dim page_size : page_size = 10
  26. dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1)
  27. dim page_count, record_count
  28. set Model = new PagedIndex_ViewModel_Class
  29. Model.Title = "Create Kit"
  30. set Model.Jurisdiction = JurisdictionRepository.SearchTablePaged(Array("JCode","%" & searchValue & "%","Name","%" & searchValue & "%","Mailing_Address","%" & searchValue & "%","CSZ","%" & searchValue & "%","IMB","%" & searchValue & "%","IMB_Digits","%" & searchValue & "%"),"JCode", page_size, page_num, page_count, record_count)
  31. Model.CurrentPageNumber = page_num
  32. Model.PageSize = page_size
  33. Model.PageCount = page_count
  34. Model.RecordCount = record_count
  35. %> <!--#include file="../../Views/Home/CreateKit.asp"--> <%
  36. End Sub
  37. Public Sub Print
  38. Dim objAccess, objDB, objReport, objPrinter
  39. dim blah:set blah = Server.CreateObject("ReportMan.ReportManX")
  40. blah.Preview = false
  41. blah.ShowProgress = false
  42. blah.ShowPrintDialog = false
  43. blah.Filename = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\Label_Report.rep"
  44. blah.SetDatabaseConnectionString "TRACKINGKITLABELS","Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=C:\inetpub\Data\webdata - Copy.mdb;"
  45. blah.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\sample.pdf",1
  46. End Sub
  47. End Class
  48. MVC.Dispatch
  49. %>

Powered by TurnKey Linux.