|
- <% Option Explicit %>
- <!--#include file="../../include_all.asp"-->
- <!--#include file="../../ViewModels/JurisdictionViewModels.asp"-->
-
- <%
- dim Model
- Class HomeController
- Public Sub Index
- %> <!--#include file="../../Views/Home/Index.asp"--> <%
- End Sub
-
- Public Sub CreateKit
- dim page_size : page_size = 10
- dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1)
- dim page_count, record_count
- set Model = new PagedIndex_ViewModel_Class
- Model.Title = "Create Kit"
- set Model.Jurisdiction = JurisdictionRepository.FindPaged(empty, "JCode", page_size, page_num, page_count, record_count)
- Model.CurrentPageNumber = page_num
- Model.PageSize = page_size
- Model.PageCount = page_count
- Model.RecordCount = record_count
- %> <!--#include file="../../Views/Home/CreateKit.asp"--> <%
- End Sub
-
- Public Sub Search
-
- dim searchValue:searchValue = Choice(Request.Form.Count = 0,Request.QueryString("q"),Request.Form("q"))
- dim page_size : page_size = 10
- dim page_num : page_num = Choice(Len(Request.Querystring("page_num")) > 0, Request.Querystring("page_num"), 1)
- dim page_count, record_count
- set Model = new PagedIndex_ViewModel_Class
- Model.Title = "Create Kit"
- 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)
- Model.CurrentPageNumber = page_num
- Model.PageSize = page_size
- Model.PageCount = page_count
- Model.RecordCount = record_count
- %> <!--#include file="../../Views/Home/CreateKit.asp"--> <%
-
- End Sub
-
-
- Public Sub Print
- Dim objAccess, objDB, objReport, objPrinter
-
- dim blah:set blah = Server.CreateObject("ReportMan.ReportManX")
- blah.Preview = false
- blah.ShowProgress = false
- blah.ShowPrintDialog = false
- blah.Filename = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\Label_Report.rep"
- blah.SetDatabaseConnectionString "TRACKINGKITLABELS","Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=C:\inetpub\Data\webdata - Copy.mdb;"
- blah.SaveToPdf Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\sample.pdf",1
- End Sub
- End Class
-
- MVC.Dispatch
- %>
|