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.

HomeController.asp 2.3KB

пре 8 месеци
пре 8 месеци
пре 8 месеци
пре 7 месеци
пре 7 месеци
пре 8 месеци
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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/CreateKit.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 = "F:\Development\Tracking_Kits\Data\Label_Report.rep"
  44. blah.SaveToPdf "F:\Development\Tracking_Kits\Data\sample.pdf",1
  45. End Sub
  46. End Class
  47. MVC.Dispatch
  48. %>

Powered by TurnKey Linux.