home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / askScheduleReportform.aspx < prev    next >
Text File  |  2010-09-01  |  6KB  |  152 lines

  1. <%@ Page Language="VB" MasterPageFile="masterpage.master" ValidateRequest="false" AutoEventWireup="false" CodeFile="askScheduleReportform.aspx.vb" Inherits="askScheduleReportform" CodeFileBaseClass="AspNetMaker7_tfpssnet" %>
  2. <asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
  3.  
  4. <script type="text/javascript">
  5. <!--
  6. // Create page object
  7. var askScheduleReport_form = new ew_Page("askScheduleReport_form");
  8. // page properties
  9. askScheduleReport_form.PageID = "list"; // page ID
  10. var EW_PAGE_ID = askScheduleReport_form.PageID; // for backward compatibility
  11. // extend page with validate function for search
  12. askScheduleReport_form.ValidateSearch = function(fobj) {
  13.     if (!this.ValidateRequired)
  14.         return true; // ignore validation
  15.     var infix = "";
  16.     elm = fobj.elements["x" + infix + "_startDate"];
  17.     if (elm && !ew_HasValue(elm))
  18.         return ew_OnError(this, elm, "Please enter required field - Start Date");
  19.     elm = fobj.elements["x" + infix + "_startDate"];
  20.     if (elm && !ew_CheckUSDate(elm.value))
  21.         return ew_OnError(this, elm, "Incorrect date, format = mm/dd/yyyy - Start Date");
  22.     elm = fobj.elements["x" + infix + "_endDate"];
  23.     if (elm && !ew_HasValue(elm))
  24.         return ew_OnError(this, elm, "Please enter required field - End Date");
  25.     elm = fobj.elements["x" + infix + "_endDate"];
  26.     if (elm && !ew_CheckUSDate(elm.value))
  27.         return ew_OnError(this, elm, "Incorrect date, format = mm/dd/yyyy - End Date");
  28.     elm = fobj.elements["x" + infix + "_schEmpID"];
  29. //    if (elm && !ew_HasValue(elm))
  30. //        return ew_OnError(this, elm, "Please enter required field - Employee");
  31.     for (var i=0;i<fobj.elements.length;i++) {
  32.         var elem = fobj.elements[i];
  33.         if (elem.name.substring(0,2) == "s_" || elem.name.substring(0,3) == "sv_")
  34.             elem.value = "";
  35.     }
  36.     return true;
  37. }
  38. <% If EW_CLIENT_VALIDATE Then %>
  39. askScheduleReport_form.ValidateRequired = true; // uses JavaScript validation
  40. <% Else %>
  41. askScheduleReport_form.ValidateRequired = false; // no JavaScript validation
  42. <% End If %>
  43. //-->
  44. </script>
  45. <link rel="stylesheet" type="text/css" media="all" href="calendar/calendar-win2k-1.css" title="win2k-1" />
  46. <script type="text/javascript" src="calendar/calendar.js"></script>
  47. <script type="text/javascript" src="calendar/lang/calendar-en.js"></script>
  48. <script type="text/javascript" src="calendar/calendar-setup.js"></script>
  49. <script language="JavaScript" type="text/javascript"></script>
  50.  
  51. <%
  52.  
  53. ' Load recordset
  54. Rs = askScheduleReport_form.LoadRecordset()
  55.     askScheduleReport_form.lStartRec = 1
  56.     If askScheduleReport_form.lDisplayRecs <= 0 Then ' Display all records
  57.         askScheduleReport_form.lDisplayRecs = askScheduleReport_form.lTotalRecs
  58.     End If
  59. %>
  60. <p><span class="aspnetmaker" style="white-space: nowrap;">REPORTS: Schedule Report
  61. </span></p>
  62.  
  63. <form name="faskScheduleReportlistsrch" id="faskScheduleReportlistsrch" class="ewForm" onsubmit="return askScheduleReport_form.ValidateSearch(this);">
  64. <input type="hidden" id="t" name="t" value="askScheduleReport" />
  65. <%
  66.  
  67. ' Render for search
  68.     askScheduleReport.RowType = EW_ROWTYPE_SEARCH
  69.  
  70. ' Render row
  71.     askScheduleReport_form.RenderRow()
  72. %>
  73. <table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
  74. <div class="ewGridMiddlePanel">
  75. <table cellspacing="0" class="ewTable">
  76. <!-- Start Date -->
  77.     <tr>
  78.         <td class="ewTableHeader">Starting Date<span class="ewRequired"> *</span></td>
  79.         <td><span id="el_startDate">
  80. <input type="text" name="x_startDate" id="x_startDate" value="<%= ew_CurrentDate %>" />
  81.  <img src="images/calendar.png" id="cal_x_startDate" name="cal_x_startDate" alt="Pick a date" style="cursor:pointer;cursor:hand;" />
  82. <script type="text/javascript">
  83.     Calendar.setup({
  84.         inputField: "x_startDate", // ID of the input field
  85.         ifFormat: "%m/%d/%Y", // the date format
  86.         button: "cal_x_startDate" // ID of the button
  87.     });
  88. </script>
  89. </span></td>
  90.     </tr>
  91. <!-- End Date -->
  92.     <tr>
  93.         <td class="ewTableHeader">Ending Date<span class="ewRequired"> *</span></td>
  94.         <td><span id="el_endDate">
  95. <input type="text" name="x_endDate" id="x_endDate" value="<%= ew_FormatDateTime(tlcLastDayOfMonth(ew_CurrentDate),6) %>" />
  96.  <img src="images/calendar.png" id="Img1" name="cal_x_endDate" alt="Pick a date" style="cursor:pointer;cursor:hand;" />
  97. <script type="text/javascript">
  98.     Calendar.setup({
  99.         inputField: "x_endDate", // ID of the input field
  100.         ifFormat: "%m/%d/%Y", // the date format
  101.         button: "cal_x_endDate" // ID of the button
  102.     });
  103. </script>
  104. </span></td>
  105.     </tr>
  106.  
  107. <%  If Security.IsAdmin And Security.IsLoggedIn() Then ' Non system admin %>
  108.     <tr>
  109.         <td class="ewTableHeader">Employee<span class="ewRequired"> *</span></td>
  110.         <td><span class="el_schEmpID">
  111.  
  112. <% If Not Security.IsAdmin And Security.IsLoggedIn() Then ' Non system admin %>
  113. <%--<div><%=tlcGetEmployeeName(ew_Session("tfpssnet_Status_UserID"))%></div>
  114. --%>
  115. <input type="hidden" name="x_schEmpID" id="x_schEmpID" value="<%= tlcGetEmployeeName(ew_Session("tfpssnet_Status_UserID")) %>" />
  116. <% Else %>
  117.  
  118. <select id="x_schEmpID" name="x_schEmpID"<%= askScheduleReport.schEmpID.EditAttributes %>>
  119. <%
  120. emptywrk = True
  121. If ew_IsArrayList(askScheduleReport.schEmpID.EditValue) Then
  122.     arwrk = askScheduleReport.schEmpID.EditValue
  123.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  124.         If ew_SameStr(arwrk(rowcntwrk)(0), askScheduleReport.schEmpID.AdvancedSearch.SearchValue) Then
  125.             selwrk = " selected=""selected"""
  126.             emptywrk = False
  127.         Else
  128.             selwrk = ""
  129.         End If
  130. %>
  131. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  132. <%= arwrk(rowcntwrk)(1) %>
  133. </option>
  134. <%
  135.     Next
  136. End If
  137. %>
  138. </select>
  139. <% End If %>
  140. <% End If %>
  141. </span></td>
  142.     </tr>
  143.  
  144. </table>
  145. </div>
  146. </td></tr></table>
  147. <p />
  148. <input type="submit" name="btnAction" id="btnAction" value="  Submit  " />
  149. </form>
  150.  
  151. </asp:Content>
  152.