home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / tblLPRStatuslist.aspx < prev    next >
Text File  |  2010-08-24  |  12KB  |  279 lines

  1. <%@ Page Language="VB" MasterPageFile="masterpage.master" ValidateRequest="false" AutoEventWireup="false" CodeFile="tblLPRStatuslist.aspx.vb" Inherits="tblLPRStatuslist" CodeFileBaseClass="AspNetMaker7_tfpssnet" %>
  2. <asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
  3. <% If tblLPRStatus.Export = "" Then %>
  4. <script type="text/javascript">
  5. <!--
  6. // Create page object
  7. var tblLPRStatus_list = new ew_Page("tblLPRStatus_list");
  8. // page properties
  9. tblLPRStatus_list.PageID = "list"; // page ID
  10. var EW_PAGE_ID = tblLPRStatus_list.PageID; // for backward compatibility
  11. <% If EW_CLIENT_VALIDATE Then %>
  12. tblLPRStatus_list.ValidateRequired = true; // uses JavaScript validation
  13. <% Else %>
  14. tblLPRStatus_list.ValidateRequired = false; // no JavaScript validation
  15. <% End If %>
  16. //-->
  17. </script>
  18. <script language="JavaScript" type="text/javascript">
  19. <!--
  20. // Write your client script here, no need to add script tags.
  21. // To include another .js script, use:
  22. // ew_ClientScriptInclude("my_javascript.js"); 
  23. //-->
  24. </script>
  25. <% End If %>
  26. <% If tblLPRStatus.Export = "" Then %>
  27. <% End If %>
  28. <%
  29.  
  30. ' Load recordset
  31. Rs = tblLPRStatus_list.LoadRecordset()
  32.     tblLPRStatus_list.lStartRec = 1
  33.     If tblLPRStatus_list.lDisplayRecs <= 0 Then ' Display all records
  34.         tblLPRStatus_list.lDisplayRecs = tblLPRStatus_list.lTotalRecs
  35.     End If
  36.     If Not (tblLPRStatus.ExportAll AndAlso tblLPRStatus.Export <> "") Then
  37.         tblLPRStatus_list.SetUpStartRec() ' Set up start record position
  38.     End If
  39. %>
  40. <p><span class="aspnetmaker" style="white-space: nowrap;">TABLE: LPR Status
  41. </span></p>
  42. <% If Security.CanSearch Then %>
  43. <% If tblLPRStatus.Export = "" AndAlso tblLPRStatus.CurrentAction = "" Then %>
  44. <a href="javascript:ew_ToggleSearchPanel(tblLPRStatus_list);" style="text-decoration: none;"><img id="tblLPRStatus_list_SearchImage" src="images/collapse.gif" alt="" width="9" height="9" border="0"></a><span class="aspnetmaker"> Search</span><br>
  45. <div id="tblLPRStatus_list_SearchPanel">
  46. <form name="ftblLPRStatuslistsrch" id="ftblLPRStatuslistsrch" class="ewForm">
  47. <input type="hidden" id="t" name="t" value="tblLPRStatus" />
  48. <table class="ewBasicSearch">
  49.     <tr>
  50.         <td><span class="aspnetmaker">
  51.             <input type="text" name="<%= EW_TABLE_BASIC_SEARCH %>" id="<%= EW_TABLE_BASIC_SEARCH %>" size="20" value="<%= ew_HtmlEncode(tblLPRStatus.BasicSearchKeyword) %>" />
  52.             <input type="Submit" name="Submit" id="Submit" value="Search (*)" /> 
  53.             <a href="<%= tblLPRStatus_list.PageUrl %>cmd=reset">Show all</a> 
  54.         </span></td>
  55.     </tr>
  56.     <tr>
  57.     <td><span class="aspnetmaker"><label><input type="radio" name="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" id="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" value=""<% If tblLPRStatus.BasicSearchType = "" Then %> checked="checked"<% End If %> />Exact phrase</label>  <label><input type="radio" name="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" id="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" value="AND"<% If tblLPRStatus.BasicSearchType = "AND" Then %> checked="checked"<% End If %> />All words</label>  <label><input type="radio" name="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" id="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" value="OR"<% If tblLPRStatus.BasicSearchType = "OR" Then %> checked="checked"<% End If %> />Any word</label></span></td>
  58.     </tr>
  59. </table>
  60. </form>
  61. </div>
  62. <% End If %>
  63. <% End If %>
  64. <% tblLPRStatus_list.ShowMessage() %>
  65. <br />
  66. <table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
  67. <div class="ewGridMiddlePanel">
  68. <form name="ftblLPRStatuslist" id="ftblLPRStatuslist" class="ewForm" method="post">
  69. <% If tblLPRStatus_list.lTotalRecs > 0 Then %>
  70. <table cellspacing="0" rowhighlightclass="ewTableHighlightRow" rowselectclass="ewTableSelectRow" roweditclass="ewTableEditRow" class="ewTable ewTableSeparate">
  71. <%
  72.     tblLPRStatus_list.lOptionCnt = 0
  73. If Security.CanView Then
  74.     tblLPRStatus_list.lOptionCnt = tblLPRStatus_list.lOptionCnt + 1 ' View
  75. End If
  76. If Security.CanEdit Then
  77.     tblLPRStatus_list.lOptionCnt = tblLPRStatus_list.lOptionCnt + 1 ' Edit
  78. End If
  79. If Security.CanDelete Then
  80.     tblLPRStatus_list.lOptionCnt = tblLPRStatus_list.lOptionCnt + 1 ' Delete
  81. End If
  82.     tblLPRStatus_list.lOptionCnt = tblLPRStatus_list.lOptionCnt + tblLPRStatus_list.ListOptions.Items.Count ' Custom list options
  83. %>
  84. <%= tblLPRStatus.TableCustomInnerHTML %>
  85. <thead><!-- Table header -->
  86.     <tr class="ewTableHeader">
  87. <% If tblLPRStatus.Export = "" Then %>
  88. <% If Security.CanView Then %>
  89. <td style="white-space: nowrap;"> </td>
  90. <% End If %>
  91. <% If Security.CanEdit Then %>
  92. <td style="white-space: nowrap;"> </td>
  93. <% End If %>
  94. <% If Security.CanDelete Then %>
  95. <td style="white-space: nowrap;"> </td>
  96. <% End If %>
  97. <%
  98.  
  99. ' Custom list options
  100. For i As Integer = 0 to tblLPRStatus_list.ListOptions.Items.Count -1
  101.     If tblLPRStatus_list.ListOptions.Items(i).Visible Then Response.Write(tblLPRStatus_list.ListOptions.Items(i).HeaderCellHtml)
  102. Next
  103. %>
  104. <% End If %>
  105. <% If tblLPRStatus.lstDescription.Visible Then ' lstDescription %>
  106.     <% If tblLPRStatus.SortUrl(tblLPRStatus.lstDescription) = "" Then %>
  107.         <td>Description</td>
  108.     <% Else %>
  109.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblLPRStatus.SortUrl(tblLPRStatus.lstDescription) %>',2);">
  110.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Description (*)</td><td style="width: 10px;"><% If tblLPRStatus.lstDescription.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblLPRStatus.lstDescription.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  111.         </td>
  112.     <% End If %>
  113. <% End If %>        
  114.     </tr>
  115. </thead>
  116. <tbody><!-- Table body -->
  117. <%
  118. If (tblLPRStatus.ExportAll AndAlso tblLPRStatus.Export <> "") Then
  119.     tblLPRStatus_list.lStopRec = tblLPRStatus_list.lTotalRecs
  120. Else
  121.     tblLPRStatus_list.lStopRec = tblLPRStatus_list.lStartRec + tblLPRStatus_list.lDisplayRecs - 1 ' Set the last record to display
  122. End If
  123. If tblLPRStatus.CurrentAction = "gridadd" AndAlso tblLPRStatus_list.lStopRec = -1 Then
  124.     tblLPRStatus_list.lStopRec = EW_GRIDADD_ROWS
  125. End If 
  126.  
  127. ' Move to first record
  128. For i As Integer = 1 to tblLPRStatus_list.lStartRec - 1
  129.     If Rs.Read() Then    tblLPRStatus_list.lRecCnt = tblLPRStatus_list.lRecCnt + 1
  130. Next        
  131. tblLPRStatus_list.lRowCnt = 0
  132.  
  133. ' Output data rows
  134. Do While (tblLPRStatus.CurrentAction = "gridadd" OrElse Rs.Read()) AndAlso (tblLPRStatus_list.lRecCnt < tblLPRStatus_list.lStopRec)
  135.     tblLPRStatus_list.lRecCnt = tblLPRStatus_list.lRecCnt + 1
  136.     If tblLPRStatus_list.lRecCnt >= tblLPRStatus_list.lStartRec Then
  137.         tblLPRStatus_list.lRowCnt = tblLPRStatus_list.lRowCnt + 1
  138.     tblLPRStatus.CssClass = ""
  139.     tblLPRStatus.CssStyle = ""
  140.     tblLPRStatus.RowClientEvents = "onmouseover='ew_MouseOver(event, this);' onmouseout='ew_MouseOut(event, this);' onclick='ew_Click(event, this);'"
  141.     If tblLPRStatus.CurrentAction = "gridadd" Then
  142.         tblLPRStatus_list.LoadDefaultValues() ' Load default values
  143.     Else
  144.         tblLPRStatus_list.LoadRowValues(Rs) ' Load row values
  145.     End If
  146.     tblLPRStatus.RowType = EW_ROWTYPE_VIEW ' Render view
  147.  
  148.     ' Render row
  149.     tblLPRStatus_list.RenderRow()
  150. %>
  151.     <tr<%= tblLPRStatus.RowAttributes %>>
  152. <% If tblLPRStatus.Export = "" Then %>
  153. <% If Security.CanView Then %>
  154. <td style="white-space: nowrap;"><span class="aspnetmaker">
  155. <a href="<%= tblLPRStatus.ViewUrl %>"><img src='images/view.gif' alt='View' title='View' width='16' height='16' border='0'></a>
  156. </span></td>
  157. <% End If %>
  158. <% If Security.CanEdit Then %>
  159. <td style="white-space: nowrap;"><span class="aspnetmaker">
  160. <a href="<%= tblLPRStatus.EditUrl %>"><img src='images/edit.gif' alt='Edit' title='Edit' width='16' height='16' border='0'></a>
  161. </span></td>
  162. <% End If %>
  163. <% If Security.CanDelete Then %>
  164. <td style="white-space: nowrap;"><span class="aspnetmaker">
  165. <a href="<%= tblLPRStatus.DeleteUrl %>"><img src='images/delete.gif' alt='Delete' title='Delete' width='16' height='16' border='0'></a>
  166. </span></td>
  167. <% End If %>
  168. <%
  169.  
  170. ' Custom list options
  171. For i As Integer = 0 to tblLPRStatus_list.ListOptions.Items.Count -1
  172.     If tblLPRStatus_list.ListOptions.Items(i).Visible Then Response.Write(tblLPRStatus_list.ListOptions.Items(i).BodyCellHtml)
  173. Next
  174. %>
  175. <% End If %>
  176.     <% If tblLPRStatus.lstDescription.Visible Then ' lstDescription %>
  177.         <td<%= tblLPRStatus.lstDescription.CellAttributes %>>
  178. <div<%= tblLPRStatus.lstDescription.ViewAttributes %>><%= tblLPRStatus.lstDescription.ListViewValue %></div>
  179. </td>
  180.     <% End If %>
  181.     </tr>
  182. <%
  183.     End If
  184. Loop
  185. %>
  186. </tbody>
  187. </table>
  188. <% End If %>
  189. </form>
  190. <%
  191.  
  192. ' Close recordset
  193. Rs.Close()
  194. Rs.Dispose()
  195. %>
  196. </div>
  197. <% If tblLPRStatus.Export = "" Then %>
  198. <div class="ewGridLowerPanel">
  199. <% If tblLPRStatus.CurrentAction <> "gridadd" AndAlso tblLPRStatus.CurrentAction <> "gridedit" Then %>
  200. <form name="ewpagerform" id="ewpagerform" class="ewForm">
  201. <table border="0" cellspacing="0" cellpadding="0" class="ewPager">
  202.     <tr>
  203.         <td>
  204. <span class="aspnetmaker">
  205. <% If tblLPRStatus_list.Pager Is Nothing Then tblLPRStatus_list.Pager = New cNumericPager(tblLPRStatus_list.lStartRec, tblLPRStatus_list.lDisplayRecs, tblLPRStatus_list.lTotalRecs, tblLPRStatus_list.lRecRange) %>
  206. <% If tblLPRStatus_list.Pager.RecordCount > 0 Then %>
  207.     <% If tblLPRStatus_list.Pager.FirstButton.Enabled Then %>
  208.     <a href="<%= tblLPRStatus_list.PageUrl %>start=<%= tblLPRStatus_list.Pager.FirstButton.Start %>">First</a> 
  209.     <% End If %>
  210.     <% If tblLPRStatus_list.Pager.PrevButton.Enabled Then %>
  211.     <a href="<%= tblLPRStatus_list.PageUrl %>start=<%= tblLPRStatus_list.Pager.PrevButton.Start %>">Previous</a> 
  212.     <% End If %>
  213.     <% For Each PagerItem As cPagerItem In tblLPRStatus_list.Pager.Items %>
  214.         <% If PagerItem.Enabled Then %><a href="<%= tblLPRStatus_list.PageUrl %>start=<%= PagerItem.Start %>"><% End If %><%= PagerItem.Text %><% If PagerItem.Enabled Then %></a><% End If %> 
  215.     <% Next %>
  216.     <% If tblLPRStatus_list.Pager.NextButton.Enabled Then %>
  217.     <a href="<%= tblLPRStatus_list.PageUrl %>start=<%= tblLPRStatus_list.Pager.NextButton.Start %>">Next</a> 
  218.     <% End If %>
  219.     <% If tblLPRStatus_list.Pager.LastButton.Enabled Then %>
  220.     <a href="<%= tblLPRStatus_list.PageUrl %>start=<%= tblLPRStatus_list.Pager.LastButton.Start %>">Last</a> 
  221.     <% End If %>
  222.     <% If tblLPRStatus_list.Pager.ButtonCount > 0 Then %>    <%    End If %>
  223.     Records <%= tblLPRStatus_list.Pager.FromIndex %> to <%= tblLPRStatus_list.Pager.ToIndex %> of <%= tblLPRStatus_list.Pager.RecordCount %>
  224. <% Else %>
  225.     <% If Security.CanList Then %>
  226.     <% If tblLPRStatus_list.sSrchWhere = "0=101" Then %>
  227.     Please enter search criteria
  228.     <% Else %>
  229.     No records found
  230.     <% End If %>
  231.     <% Else %>
  232.     You do not have the right permission to view the page
  233.     <% End If %>
  234. <% End If %>
  235. </span>
  236.         </td>
  237. <% If tblLPRStatus_list.lTotalRecs > 0 Then %>
  238.         <td>    </td>
  239.         <td><table border="0" cellspacing="0" cellpadding="0"><tr><td>Page Size </td><td>
  240. <input type="hidden" id="t" name="t" value="tblLPRStatus" />
  241. <select name="<%= EW_TABLE_REC_PER_PAGE %>" id="<%= EW_TABLE_REC_PER_PAGE %>" onchange="this.form.submit();" class="aspnetmaker">
  242. <option value="10"<% If tblLPRStatus_list.lDisplayRecs = 10 Then %> selected="selected"<% End If %>>10</option>
  243. <option value="20"<% If tblLPRStatus_list.lDisplayRecs = 20 Then %> selected="selected"<% End If %>>20</option>
  244. <option value="50"<% If tblLPRStatus_list.lDisplayRecs = 50 Then %> selected="selected"<% End If %>>50</option>
  245. <option value="ALL"<% If tblLPRStatus.RecordsPerPage = -1 Then %> selected="selected"<% End If %>>All</option>
  246. </select></td></tr></table>
  247.         </td>
  248. <% End If %>
  249.     </tr>
  250. </table>
  251. </form>
  252. <% End If %>
  253. <% 'If tblLPRStatus_list.lTotalRecs > 0 Then %>
  254. <div class="aspnetmaker">
  255. <% If Security.CanAdd Then %>
  256. <a href="<%= tblLPRStatus.AddUrl %>">Add</a>  
  257. <% End If %>
  258. </div>
  259. <% 'End If %>
  260. </div>
  261. <% End If %>
  262. </td></tr></table>
  263. <% If tblLPRStatus.Export = "" AndAlso tblLPRStatus.CurrentAction = "" Then %>
  264. <script type="text/javascript">
  265. <!--
  266. //ew_ToggleSearchPanel(tblLPRStatus_list); // uncomment to init search panel as collapsed
  267. //-->
  268. </script>
  269. <% End If %>
  270. <% If tblLPRStatus.Export = "" Then %>
  271. <script language="JavaScript" type="text/javascript">
  272. <!--
  273. // Write your table-specific startup script here
  274. // document.write("page loaded");
  275. //-->
  276. </script>
  277. <% End If %>
  278. </asp:Content>
  279.