home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / tblPositionslist.aspx < prev    next >
Text File  |  2015-04-14  |  13KB  |  295 lines

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