home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / tblEmployeeslist.aspx < prev    next >
Text File  |  2012-01-31  |  24KB  |  466 lines

  1. <%@ Page Language="VB" MasterPageFile="masterpage.master" ValidateRequest="false" AutoEventWireup="false" CodeFile="tblEmployeeslist.aspx.vb" Inherits="tblEmployeeslist" CodeFileBaseClass="AspNetMaker7_tfpssnet" %>
  2. <asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
  3. <% If tblEmployees.Export = "" Then %>
  4. <script type="text/javascript">
  5. <!--
  6. // Create page object
  7. var tblEmployees_list = new ew_Page("tblEmployees_list");
  8. // page properties
  9. tblEmployees_list.PageID = "list"; // page ID
  10. var EW_PAGE_ID = tblEmployees_list.PageID; // for backward compatibility
  11. <% If EW_CLIENT_VALIDATE Then %>
  12. tblEmployees_list.ValidateRequired = true; // uses JavaScript validation
  13. <% Else %>
  14. tblEmployees_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 tblEmployees.Export = "" Then %>
  27. <% End If %>
  28. <%
  29.  
  30. ' Load recordset
  31. Rs = tblEmployees_list.LoadRecordset()
  32.     tblEmployees_list.lStartRec = 1
  33.     If tblEmployees_list.lDisplayRecs <= 0 Then ' Display all records
  34.         tblEmployees_list.lDisplayRecs = tblEmployees_list.lTotalRecs
  35.     End If
  36.     If Not (tblEmployees.ExportAll AndAlso tblEmployees.Export <> "") Then
  37.         tblEmployees_list.SetUpStartRec() ' Set up start record position
  38.     End If
  39. %>
  40. <p><span class="aspnetmaker" style="white-space: nowrap;">TABLE: Employees
  41. </span></p>
  42. <% If Security.CanSearch Then %>
  43. <% If tblEmployees.Export = "" AndAlso tblEmployees.CurrentAction = "" Then %>
  44. <a href="javascript:ew_ToggleSearchPanel(tblEmployees_list);" style="text-decoration: none;"><img id="tblEmployees_list_SearchImage" src="images/collapse.gif" alt="" width="9" height="9" border="0"></a><span class="aspnetmaker"> Search</span><br>
  45. <div id="tblEmployees_list_SearchPanel">
  46. <form name="ftblEmployeeslistsrch" id="ftblEmployeeslistsrch" class="ewForm">
  47. <input type="hidden" id="t" name="t" value="tblEmployees" />
  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(tblEmployees.BasicSearchKeyword) %>" />
  52.             <input type="Submit" name="Submit" id="Submit" value="Search (*)" /> 
  53.             <a href="<%= tblEmployees_list.PageUrl %>cmd=reset">Show all</a> 
  54.             <a href="tblEmployeessrch.aspx">Advanced Search</a> 
  55.         </span></td>
  56.     </tr>
  57.     <tr>
  58.     <td><span class="aspnetmaker"><label><input type="radio" name="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" id="<%= EW_TABLE_BASIC_SEARCH_TYPE %>" value=""<% If tblEmployees.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 tblEmployees.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 tblEmployees.BasicSearchType = "OR" Then %> checked="checked"<% End If %> />Any word</label></span></td>
  59.     </tr>
  60. </table>
  61. </form>
  62. </div>
  63. <% End If %>
  64. <% End If %>
  65. <% tblEmployees_list.ShowMessage() %>
  66. <br />
  67. <table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
  68.  
  69.  
  70. <% If tblEmployees.Export = "" Then %>
  71. <div class="ewGridLowerPanel">
  72. <% 'If tblEmployees_list.lTotalRecs > 0 Then %>
  73. <div class="aspnetmaker">
  74. <% If Security.CanAdd Then %>
  75. <a href="<%= tblEmployees.AddUrl %>">Add</a>  
  76. <% End If %>
  77. </div>
  78. <% 'End If %>
  79. <% If tblEmployees.CurrentAction <> "gridadd" AndAlso tblEmployees.CurrentAction <> "gridedit" Then %>
  80. <form name="ewpagerform" id="Form1" class="ewForm">
  81. <table border="0" cellspacing="0" cellpadding="0" class="ewPager">
  82.     <tr>
  83.         <td>
  84. <span class="aspnetmaker">
  85. <% If tblEmployees_list.Pager Is Nothing Then tblEmployees_list.Pager = New cNumericPager(tblEmployees_list.lStartRec, tblEmployees_list.lDisplayRecs, tblEmployees_list.lTotalRecs, tblEmployees_list.lRecRange) %>
  86. <% If tblEmployees_list.Pager.RecordCount > 0 Then %>
  87.     <% If tblEmployees_list.Pager.FirstButton.Enabled Then %>
  88.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.FirstButton.Start %>">First</a> 
  89.     <% End If %>
  90.     <% If tblEmployees_list.Pager.PrevButton.Enabled Then %>
  91.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.PrevButton.Start %>">Previous</a> 
  92.     <% End If %>
  93.     <% For Each PagerItem As cPagerItem In tblEmployees_list.Pager.Items %>
  94.         <% If PagerItem.Enabled Then %><a href="<%= tblEmployees_list.PageUrl %>start=<%= PagerItem.Start %>"><% End If %><%= PagerItem.Text %><% If PagerItem.Enabled Then %></a><% End If %> 
  95.     <% Next %>
  96.     <% If tblEmployees_list.Pager.NextButton.Enabled Then %>
  97.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.NextButton.Start %>">Next</a> 
  98.     <% End If %>
  99.     <% If tblEmployees_list.Pager.LastButton.Enabled Then %>
  100.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.LastButton.Start %>">Last</a> 
  101.     <% End If %>
  102.     <% If tblEmployees_list.Pager.ButtonCount > 0 Then %>    <%    End If %>
  103.     Records <%= tblEmployees_list.Pager.FromIndex %> to <%= tblEmployees_list.Pager.ToIndex %> of <%= tblEmployees_list.Pager.RecordCount %>
  104. <% Else %>
  105.     <% If Security.CanList Then %>
  106.     <% If tblEmployees_list.sSrchWhere = "0=101" Then %>
  107.     Please enter search criteria
  108.     <% Else %>
  109.     No records found
  110.     <% End If %>
  111.     <% Else %>
  112.     You do not have the right permission to view the page
  113.     <% End If %>
  114. <% End If %>
  115. </span>
  116.         </td>
  117. <% If tblEmployees_list.lTotalRecs > 0 Then %>
  118.         <td>    </td>
  119.         <td><table border="0" cellspacing="0" cellpadding="0"><tr><td>Page Size </td><td>
  120. <input type="hidden" id="Hidden1" name="t" value="tblEmployees" />
  121. <select name="<%= EW_TABLE_REC_PER_PAGE %>" id="Select1" onchange="this.form.submit();" class="aspnetmaker">
  122. <option value="10"<% If tblEmployees_list.lDisplayRecs = 10 Then %> selected="selected"<% End If %>>10</option>
  123. <option value="20"<% If tblEmployees_list.lDisplayRecs = 20 Then %> selected="selected"<% End If %>>20</option>
  124. <option value="50"<% If tblEmployees_list.lDisplayRecs = 50 Then %> selected="selected"<% End If %>>50</option>
  125. <option value="ALL"<% If tblEmployees.RecordsPerPage = -1 Then %> selected="selected"<% End If %>>All</option>
  126. </select></td></tr></table>
  127.         </td>
  128. <% End If %>
  129.     </tr>
  130. </table>
  131. </form>
  132. <% End If %>
  133. </div>
  134. <% End If %>
  135.  
  136.  
  137. <div class="ewGridMiddlePanel">
  138. <form name="ftblEmployeeslist" id="ftblEmployeeslist" class="ewForm" method="post">
  139. <% If tblEmployees_list.lTotalRecs > 0 Then %>
  140. <table cellspacing="0" rowhighlightclass="ewTableHighlightRow" rowselectclass="ewTableSelectRow" roweditclass="ewTableEditRow" class="ewTable ewTableSeparate">
  141. <%
  142.     tblEmployees_list.lOptionCnt = 0
  143. If Security.CanView Then
  144.     tblEmployees_list.lOptionCnt = tblEmployees_list.lOptionCnt + 1 ' View
  145. End If
  146. If Security.CanEdit Then
  147.     tblEmployees_list.lOptionCnt = tblEmployees_list.lOptionCnt + 1 ' Edit
  148. End If
  149. If Security.CanDelete Then
  150.     tblEmployees_list.lOptionCnt = tblEmployees_list.lOptionCnt + 1 ' Delete
  151. End If
  152.     tblEmployees_list.lOptionCnt = tblEmployees_list.lOptionCnt + tblEmployees_list.ListOptions.Items.Count ' Custom list options
  153. %>
  154. <%= tblEmployees.TableCustomInnerHTML %>
  155. <thead><!-- Table header -->
  156.     <tr class="ewTableHeader">
  157. <% If tblEmployees.Export = "" Then %>
  158. <% If Security.CanView Then %>
  159. <td style="white-space: nowrap;"> </td>
  160. <% End If %>
  161. <% If Security.CanEdit Then %>
  162. <td style="white-space: nowrap;"> </td>
  163. <% End If %>
  164. <% If Security.CanDelete Then %>
  165. <td style="white-space: nowrap;"> </td>
  166. <% End If %>
  167. <%
  168.  
  169. ' Custom list options
  170. For i As Integer = 0 to tblEmployees_list.ListOptions.Items.Count -1
  171.     If tblEmployees_list.ListOptions.Items(i).Visible Then Response.Write(tblEmployees_list.ListOptions.Items(i).HeaderCellHtml)
  172. Next
  173. %>
  174. <% End If %>
  175. <% If tblEmployees.empPayrollNumber.Visible Then ' empPayrollNumber %>
  176.     <% If tblEmployees.SortUrl(tblEmployees.empPayrollNumber) = "" Then %>
  177.         <td>ID</td>
  178.     <% Else %>
  179.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empPayrollNumber) %>',2);">
  180.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>ID</td><td style="width: 10px;"><% If tblEmployees.empID.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empID.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  181.         </td>
  182.     <% End If %>
  183. <% End If %>        
  184. <% If tblEmployees.empUsername.Visible Then ' empUsername %>
  185.     <% If tblEmployees.SortUrl(tblEmployees.empUsername) = "" Then %>
  186.         <td>Username</td>
  187.     <% Else %>
  188.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empUsername) %>',2);">
  189.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Username (*)</td><td style="width: 10px;"><% If tblEmployees.empUsername.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empUsername.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  190.         </td>
  191.     <% End If %>
  192. <% End If %>        
  193. <% If tblEmployees.empName.Visible Then ' empName %>
  194.     <% If tblEmployees.SortUrl(tblEmployees.empName) = "" Then %>
  195.         <td>Full Name</td>
  196.     <% Else %>
  197.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empName) %>',2);">
  198.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Full Name (*)</td><td style="width: 10px;"><% If tblEmployees.empName.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empName.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  199.         </td>
  200.     <% End If %>
  201. <% End If %>        
  202. <% If tblEmployees.empPhone.Visible Then ' empPhone %>
  203.     <% If tblEmployees.SortUrl(tblEmployees.empPhone) = "" Then %>
  204.         <td>Phone Number (xxx-xxx-xxxx)</td>
  205.     <% Else %>
  206.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empPhone) %>',2);">
  207.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Phone Number (xxx-xxx-xxxx) (*)</td><td style="width: 10px;"><% If tblEmployees.empPhone.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empPhone.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  208.         </td>
  209.     <% End If %>
  210. <% End If %>        
  211. <% If tblEmployees.empStatusID.Visible Then ' empStatusID %>
  212.     <% If tblEmployees.SortUrl(tblEmployees.empStatusID) = "" Then %>
  213.         <td>Status</td>
  214.     <% Else %>
  215.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empStatusID) %>',2);">
  216.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Status</td><td style="width: 10px;"><% If tblEmployees.empStatusID.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empStatusID.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  217.         </td>
  218.     <% End If %>
  219. <% End If %>        
  220. <% If tblEmployees.empPositionID.Visible Then ' empPositionID %>
  221.     <% If tblEmployees.SortUrl(tblEmployees.empPositionID) = "" Then %>
  222.         <td>Position</td>
  223.     <% Else %>
  224.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empPositionID) %>',2);">
  225.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Position</td><td style="width: 10px;"><% If tblEmployees.empPositionID.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empPositionID.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  226.         </td>
  227.     <% End If %>
  228. <% End If %>        
  229. <% If tblEmployees.empEmail.Visible Then ' empEmail %>
  230.     <% If tblEmployees.SortUrl(tblEmployees.empEmail) = "" Then %>
  231.         <td>Email</td>
  232.     <% Else %>
  233.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empEmail) %>',2);">
  234.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Email (*)</td><td style="width: 10px;"><% If tblEmployees.empEmail.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empEmail.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  235.         </td>
  236.     <% End If %>
  237. <% End If %>        
  238. <% If tblEmployees.empTimeClock.Visible Then ' empTimeClock %>
  239.     <% If tblEmployees.SortUrl(tblEmployees.empTimeClock) = "" Then %>
  240.         <td>Time Clock</td>
  241.     <% Else %>
  242.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empTimeClock) %>',2);">
  243.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>Time Clock</td><td style="width: 10px;"><% If tblEmployees.empTimeClock.Sort = "ASC" Then %><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empTimeClock.Sort = "DESC" Then %><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  244.         </td>
  245.     <% End If %>
  246. <% End If %>        
  247. <%  If tblEmployees.empUserLevel.Visible Then ' empUserLevel %>
  248.     <% If tblEmployees.SortUrl(tblEmployees.empUserLevel) = "" Then%>
  249.         <td>User Level</td>
  250.     <% Else %>
  251.         <td class="ewPointer" onmousedown="ew_Sort(event,'<%= tblEmployees.SortUrl(tblEmployees.empUserLevel) %>',2);">
  252.             <table cellspacing="0" class="ewTableHeaderBtn"><tr><td>User Level (*)</td><td style="width: 10px;"><% If tblEmployees.empUserLevel.Sort = "ASC" Then%><img src="images/sortup.gif" width="10" height="9" border="0"><% ElseIf tblEmployees.empUserLevel.Sort = "DESC" Then%><img src="images/sortdown.gif" width="10" height="9" border="0"><% End If %></td></tr></table>
  253.         </td>
  254.     <% End If %>
  255. <% End If %>        
  256.     </tr>
  257. </thead>
  258. <tbody><!-- Table body -->
  259. <%
  260. If (tblEmployees.ExportAll AndAlso tblEmployees.Export <> "") Then
  261.     tblEmployees_list.lStopRec = tblEmployees_list.lTotalRecs
  262. Else
  263.     tblEmployees_list.lStopRec = tblEmployees_list.lStartRec + tblEmployees_list.lDisplayRecs - 1 ' Set the last record to display
  264. End If
  265. If tblEmployees.CurrentAction = "gridadd" AndAlso tblEmployees_list.lStopRec = -1 Then
  266.     tblEmployees_list.lStopRec = EW_GRIDADD_ROWS
  267. End If 
  268.  
  269. ' Move to first record
  270. For i As Integer = 1 to tblEmployees_list.lStartRec - 1
  271.     If Rs.Read() Then    tblEmployees_list.lRecCnt = tblEmployees_list.lRecCnt + 1
  272. Next        
  273. tblEmployees_list.lRowCnt = 0
  274.  
  275. ' Output data rows
  276. Do While (tblEmployees.CurrentAction = "gridadd" OrElse Rs.Read()) AndAlso (tblEmployees_list.lRecCnt < tblEmployees_list.lStopRec)
  277.     tblEmployees_list.lRecCnt = tblEmployees_list.lRecCnt + 1
  278.     If tblEmployees_list.lRecCnt >= tblEmployees_list.lStartRec Then
  279.         tblEmployees_list.lRowCnt = tblEmployees_list.lRowCnt + 1
  280.     tblEmployees.CssClass = ""
  281.     tblEmployees.CssStyle = ""
  282.     tblEmployees.RowClientEvents = "onmouseover='ew_MouseOver(event, this);' onmouseout='ew_MouseOut(event, this);' onclick='ew_Click(event, this);'"
  283.     If tblEmployees.CurrentAction = "gridadd" Then
  284.         tblEmployees_list.LoadDefaultValues() ' Load default values
  285.     Else
  286.         tblEmployees_list.LoadRowValues(Rs) ' Load row values
  287.     End If
  288.     tblEmployees.RowType = EW_ROWTYPE_VIEW ' Render view
  289.  
  290.     ' Render row
  291.     tblEmployees_list.RenderRow()
  292. %>
  293.     <tr<%= tblEmployees.RowAttributes %>>
  294. <% If tblEmployees.Export = "" Then %>
  295. <% If Security.CanView Then %>
  296. <td style="white-space: nowrap;"><span class="aspnetmaker"><% If tblEmployees_list.ShowOptionLink() Then %>
  297. <a href="<%= tblEmployees.ViewUrl %>"><img src='images/view.gif' alt='View' title='View' width='16' height='16' border='0'></a>
  298. <% End If %></span></td>
  299. <% End If %>
  300. <% If Security.CanEdit Then %>
  301. <td style="white-space: nowrap;"><span class="aspnetmaker"><% If tblEmployees_list.ShowOptionLink() Then %>
  302. <a href="<%= tblEmployees.EditUrl %>"><img src='images/edit.gif' alt='Edit' title='Edit' width='16' height='16' border='0'></a>
  303. <% End If %></span></td>
  304. <% End If %>
  305. <% If Security.CanDelete Then %>
  306. <td style="white-space: nowrap;"><span class="aspnetmaker"><% If tblEmployees_list.ShowOptionLink() Then %>
  307. <a href="<%= tblEmployees.DeleteUrl %>"><img src='images/delete.gif' alt='Delete' title='Delete' width='16' height='16' border='0'></a>
  308. <% End If %></span></td>
  309. <% End If %>
  310. <%
  311.  
  312. ' Custom list options
  313. For i As Integer = 0 to tblEmployees_list.ListOptions.Items.Count -1
  314.     If tblEmployees_list.ListOptions.Items(i).Visible Then Response.Write(tblEmployees_list.ListOptions.Items(i).BodyCellHtml)
  315. Next
  316. %>
  317. <% End If %>
  318.     <% If tblEmployees.empPayrollNumber.Visible Then ' empPayrollNumber%>
  319.         <td<%= tblEmployees.empPayrollNumber.CellAttributes %>>
  320. <div<%= tblEmployees.empPayrollNumber.ViewAttributes %>><%= tblEmployees.empPayrollNumber.ListViewValue %></div>
  321. </td>
  322.     <% End If %>
  323.     <% If tblEmployees.empUsername.Visible Then ' empUsername %>
  324.         <td<%= tblEmployees.empUsername.CellAttributes %>>
  325. <div<%= tblEmployees.empUsername.ViewAttributes %>><%= tblEmployees.empUsername.ListViewValue %></div>
  326. </td>
  327.     <% End If %>
  328.     <% If tblEmployees.empName.Visible Then ' empName %>
  329.         <td<%= tblEmployees.empName.CellAttributes %>>
  330. <div<%= tblEmployees.empName.ViewAttributes %>><%= tblEmployees.empName.ListViewValue %></div>
  331. </td>
  332.     <% End If %>
  333.     <% If tblEmployees.empPhone.Visible Then ' empPhone %>
  334.         <td<%= tblEmployees.empPhone.CellAttributes %>>
  335. <div<%= tblEmployees.empPhone.ViewAttributes %>><%= tblEmployees.empPhone.ListViewValue %></div>
  336. </td>
  337.     <% End If %>
  338.     <% If tblEmployees.empStatusID.Visible Then ' empStatusID %>
  339.         <td<%= tblEmployees.empStatusID.CellAttributes %>>
  340. <div<%= tblEmployees.empStatusID.ViewAttributes %>><%= tblEmployees.empStatusID.ListViewValue %></div>
  341. </td>
  342.     <% End If %>
  343.     <% If tblEmployees.empPositionID.Visible Then ' empPositionID %>
  344.         <td<%= tblEmployees.empPositionID.CellAttributes %>>
  345. <div<%= tblEmployees.empPositionID.ViewAttributes %>><%= tblEmployees.empPositionID.ListViewValue %></div>
  346. </td>
  347.     <% End If %>
  348.     <% If tblEmployees.empEmail.Visible Then ' empEmail %>
  349.         <td<%= tblEmployees.empEmail.CellAttributes %>>
  350. <div<%= tblEmployees.empEmail.ViewAttributes %>><%= tblEmployees.empEmail.ListViewValue %></div>
  351. </td>
  352.     <% End If %>
  353.     <% If tblEmployees.empTimeClock.Visible Then ' empTimeClock %>
  354.         <td<%= tblEmployees.empTimeClock.CellAttributes %>>
  355. <% If Convert.ToString(tblEmployees.empTimeClock.CurrentValue) = "1" Then %>
  356. <input type="checkbox" value="<%= tblEmployees.empTimeClock.ListViewValue %>" checked onclick="this.form.reset();" disabled="disabled" />
  357. <% Else %>
  358. <input type="checkbox" value="<%= tblEmployees.empTimeClock.ListViewValue %>" onclick="this.form.reset();" disabled="disabled" />
  359. <% End If %>
  360. </td>
  361.     <% End If %>
  362.     <% If tblEmployees.empUserLevel.Visible Then ' empUserLevel %>
  363.         <td<%= tblEmployees.empUserLevel.CellAttributes %>>
  364. <div<%= tblEmployees.empUserLevel.ViewAttributes %>><%= tblEmployees.empUserLevel.ListViewValue%></div>
  365. </td>
  366.     <% End If %>
  367.     </tr>
  368. <%
  369.     End If
  370. Loop
  371. %>
  372. </tbody>
  373. </table>
  374. <% End If %>
  375. </form>
  376. <%
  377.  
  378. ' Close recordset
  379. Rs.Close()
  380. Rs.Dispose()
  381. %>
  382. </div>
  383. <% If tblEmployees.Export = "" Then %>
  384. <div class="ewGridLowerPanel">
  385. <% 'If tblEmployees_list.lTotalRecs > 0 Then %>
  386. <div class="aspnetmaker">
  387. <% If Security.CanAdd Then %>
  388. <a href="<%= tblEmployees.AddUrl %>">Add</a>  
  389. <% End If %>
  390. </div>
  391. <% 'End If %>
  392.  
  393. <% If tblEmployees.CurrentAction <> "gridadd" AndAlso tblEmployees.CurrentAction <> "gridedit" Then %>
  394. <form name="ewpagerform" id="ewpagerform" class="ewForm">
  395. <table border="0" cellspacing="0" cellpadding="0" class="ewPager">
  396.     <tr>
  397.         <td>
  398. <span class="aspnetmaker">
  399. <% If tblEmployees_list.Pager Is Nothing Then tblEmployees_list.Pager = New cNumericPager(tblEmployees_list.lStartRec, tblEmployees_list.lDisplayRecs, tblEmployees_list.lTotalRecs, tblEmployees_list.lRecRange) %>
  400. <% If tblEmployees_list.Pager.RecordCount > 0 Then %>
  401.     <% If tblEmployees_list.Pager.FirstButton.Enabled Then %>
  402.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.FirstButton.Start %>">First</a> 
  403.     <% End If %>
  404.     <% If tblEmployees_list.Pager.PrevButton.Enabled Then %>
  405.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.PrevButton.Start %>">Previous</a> 
  406.     <% End If %>
  407.     <% For Each PagerItem As cPagerItem In tblEmployees_list.Pager.Items %>
  408.         <% If PagerItem.Enabled Then %><a href="<%= tblEmployees_list.PageUrl %>start=<%= PagerItem.Start %>"><% End If %><%= PagerItem.Text %><% If PagerItem.Enabled Then %></a><% End If %> 
  409.     <% Next %>
  410.     <% If tblEmployees_list.Pager.NextButton.Enabled Then %>
  411.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.NextButton.Start %>">Next</a> 
  412.     <% End If %>
  413.     <% If tblEmployees_list.Pager.LastButton.Enabled Then %>
  414.     <a href="<%= tblEmployees_list.PageUrl %>start=<%= tblEmployees_list.Pager.LastButton.Start %>">Last</a> 
  415.     <% End If %>
  416.     <% If tblEmployees_list.Pager.ButtonCount > 0 Then %>    <%    End If %>
  417.     Records <%= tblEmployees_list.Pager.FromIndex %> to <%= tblEmployees_list.Pager.ToIndex %> of <%= tblEmployees_list.Pager.RecordCount %>
  418. <% Else %>
  419.     <% If Security.CanList Then %>
  420.     <% If tblEmployees_list.sSrchWhere = "0=101" Then %>
  421.     Please enter search criteria
  422.     <% Else %>
  423.     No records found
  424.     <% End If %>
  425.     <% Else %>
  426.     You do not have the right permission to view the page
  427.     <% End If %>
  428. <% End If %>
  429. </span>
  430.         </td>
  431. <% If tblEmployees_list.lTotalRecs > 0 Then %>
  432.         <td>    </td>
  433.         <td><table border="0" cellspacing="0" cellpadding="0"><tr><td>Page Size </td><td>
  434. <input type="hidden" id="t" name="t" value="tblEmployees" />
  435. <select name="<%= EW_TABLE_REC_PER_PAGE %>" id="<%= EW_TABLE_REC_PER_PAGE %>" onchange="this.form.submit();" class="aspnetmaker">
  436. <option value="10"<% If tblEmployees_list.lDisplayRecs = 10 Then %> selected="selected"<% End If %>>10</option>
  437. <option value="20"<% If tblEmployees_list.lDisplayRecs = 20 Then %> selected="selected"<% End If %>>20</option>
  438. <option value="50"<% If tblEmployees_list.lDisplayRecs = 50 Then %> selected="selected"<% End If %>>50</option>
  439. <option value="ALL"<% If tblEmployees.RecordsPerPage = -1 Then %> selected="selected"<% End If %>>All</option>
  440. </select></td></tr></table>
  441.         </td>
  442. <% End If %>
  443.     </tr>
  444. </table>
  445. </form>
  446. <% End If %>
  447. </div>
  448. <% End If %>
  449. </td></tr></table>
  450. <% If tblEmployees.Export = "" AndAlso tblEmployees.CurrentAction = "" Then %>
  451. <script type="text/javascript">
  452. <!--
  453. //ew_ToggleSearchPanel(tblEmployees_list); // uncomment to init search panel as collapsed
  454. //-->
  455. </script>
  456. <% End If %>
  457. <% If tblEmployees.Export = "" Then %>
  458. <script language="JavaScript" type="text/javascript">
  459. <!--
  460. // Write your table-specific startup script here
  461. // document.write("page loaded");
  462. //-->
  463. </script>
  464. <% End If %>
  465. </asp:Content>
  466.