home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / tblLPRadd.aspx < prev    next >
Text File  |  2012-02-19  |  15KB  |  341 lines

  1. <%@ Page Language="VB" MasterPageFile="masterpage.master" ValidateRequest="false" AutoEventWireup="false" CodeFile="tblLPRadd.aspx.vb" Inherits="tblLPRadd" CodeFileBaseClass="AspNetMaker7_tfpssnet" %>
  2. <asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
  3. <script type="text/javascript">
  4. <!--
  5. // Create page object
  6. var tblLPR_add = new ew_Page("tblLPR_add");
  7. // page properties
  8. tblLPR_add.PageID = "add"; // page ID
  9. var EW_PAGE_ID = tblLPR_add.PageID; // for backward compatibility
  10. // extend page with ValidateForm function
  11. tblLPR_add.ValidateForm = function(fobj) {
  12.     if (!this.ValidateRequired)
  13.         return true; // ignore validation
  14.     if (fobj.a_confirm && fobj.a_confirm.value == "F")
  15.         return true;
  16.     var i, elm, aelm, infix;
  17.     var rowcnt = (fobj.key_count) ? Number(fobj.key_count.value) : 1;
  18.     for (i=0; i<rowcnt; i++) {
  19.         infix = (fobj.key_count) ? String(i+1) : "";
  20.         elm = fobj.elements["x" + infix + "_lprEmpID"];
  21.         if (elm && !ew_HasValue(elm))
  22.             return ew_OnError(this, elm, "Please enter required field - Employee");
  23.         elm = fobj.elements["x" + infix + "_lprDate"];
  24.         if (elm && !ew_HasValue(elm))
  25.             return ew_OnError(this, elm, "Please enter required field - Date");
  26.         elm = fobj.elements["x" + infix + "_lprDate"];
  27.         if (elm && !ew_CheckUSDate(elm.value))
  28.             return ew_OnError(this, elm, "Incorrect date, format = mm/dd/yyyy - Date");
  29.         elm = fobj.elements["x" + infix + "_lprLocationID"];
  30.         if (elm && !ew_HasValue(elm))
  31.             return ew_OnError(this, elm, "Please enter required field - Location");
  32.         elm = fobj.elements["x" + infix + "_lprFixtureLocationID"];
  33.         if (elm && !ew_HasValue(elm))
  34.             return ew_OnError(this, elm, "Please enter required field - Fixture Location");
  35.         elm = fobj.elements["x" + infix + "_lprFixtureTypeID"];
  36.         if (elm && !ew_HasValue(elm))
  37.             return ew_OnError(this, elm, "Please enter required field - Fixture Type");
  38.         elm = fobj.elements["x" + infix + "_lprFixtureNumber"];
  39.         if (elm && !ew_CheckInteger(elm.value))
  40.             return ew_OnError(this, elm, "Incorrect integer - Fixture Number");
  41.         elm = fobj.elements["x" + infix + "_lprChannelNumber"];
  42.         if (elm && !ew_HasValue(elm))
  43.             return ew_OnError(this, elm, "Please enter required field - Channel Number");
  44.         elm = fobj.elements["x" + infix + "_lprChannelNumber"];
  45.         if (elm && !ew_CheckInteger(elm.value))
  46.             return ew_OnError(this, elm, "Incorrect integer - Channel Number");
  47.         elm = fobj.elements["x" + infix + "_lprPriority"];
  48.         if (elm && !ew_HasValue(elm))
  49.             return ew_OnError(this, elm, "Please enter required field - Priority");
  50.         elm = fobj.elements["x" + infix + "_lprShortDesc"];
  51.         if (elm && !ew_HasValue(elm))
  52.             return ew_OnError(this, elm, "Please enter required field - Short Desc");
  53.         elm = fobj.elements["x" + infix + "_lprSTID"];
  54.         if (elm && !ew_HasValue(elm))
  55.             return ew_OnError(this, elm, "Please enter required field - Status");
  56.     }
  57.     return true;
  58. }
  59. <% If EW_CLIENT_VALIDATE Then %>
  60. tblLPR_add.ValidateRequired = true; // uses JavaScript validation
  61. <% Else %>
  62. tblLPR_add.ValidateRequired = false; // no JavaScript validation
  63. <% End If %>
  64. // search highlight properties
  65. tblLPR_add.ShowHighlightText = "Show highlight"; 
  66. tblLPR_add.HideHighlightText = "Hide highlight";
  67. //-->
  68. </script>
  69. <link rel="stylesheet" type="text/css" media="all" href="calendar/calendar-win2k-1.css" title="win2k-1" />
  70. <script type="text/javascript" src="calendar/calendar.js"></script>
  71. <script type="text/javascript" src="calendar/lang/calendar-en.js"></script>
  72. <script type="text/javascript" src="calendar/calendar-setup.js"></script>
  73. <script language="JavaScript" type="text/javascript">
  74. <!--
  75. // Write your client script here, no need to add script tags.
  76. // To include another .js script, use:
  77. // ew_ClientScriptInclude("my_javascript.js"); 
  78. //-->
  79. </script>
  80. <p><span class="aspnetmaker">Add to TABLE: Lighting Problem Reporting<br /><br />
  81. <a href="<%= tblLPR.ReturnUrl %>">Go Back</a></span></p>
  82. <% tblLPR_add.ShowMessage() %>
  83. <form name="ftblLPRadd" id="ftblLPRadd" method="post" onsubmit="this.action=location.pathname;return tblLPR_add.ValidateForm(this);">
  84. <p />
  85. <input type="hidden" name="t" id="t" value="tblLPR" />
  86. <input type="hidden" name="a_add" id="a_add" value="A" />
  87. <table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
  88. <div class="ewGridMiddlePanel">
  89. <table cellspacing="0" class="ewTable">
  90. <% If tblLPR.lprEmpID.Visible Then ' lprEmpID %>
  91.     <tr<%= tblLPR.lprEmpID.RowAttributes %>>
  92.         <td class="ewTableHeader">Employee<span class="ewRequired"> *</span></td>
  93.         <td<%= tblLPR.lprEmpID.CellAttributes %>><span id="el_lprEmpID">
  94. <% If Not Security.IsAdmin And Security.IsLoggedIn() Then ' Non system admin %>
  95. <div<%= tblLPR.lprEmpID.ViewAttributes %>><%= tblLPR.lprEmpID.EditValue %></div>
  96. <input type="hidden" name="x_lprEmpID" id="x_lprEmpID" value="<%= ew_HTMLEncode(tblLPR.lprEmpID.CurrentValue) %>" />
  97. <% Else %>
  98. <select id="x_lprEmpID" name="x_lprEmpID"<%= tblLPR.lprEmpID.EditAttributes %>>
  99. <%
  100. emptywrk = True
  101. If ew_IsArrayList(tblLPR.lprEmpID.EditValue) Then
  102.     arwrk = tblLPR.lprEmpID.EditValue
  103.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  104.         If ew_SameStr(arwrk(rowcntwrk)(0), tblLPR.lprEmpID.CurrentValue) Then
  105.             selwrk = " selected=""selected"""
  106.             emptywrk = False
  107.         Else
  108.             selwrk = ""
  109.         End If
  110. %>
  111. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  112. <%= arwrk(rowcntwrk)(1) %>
  113. </option>
  114. <%
  115.     Next
  116. End If
  117. %>
  118. </select>
  119. <% End If %>
  120. </span><%= tblLPR.lprEmpID.CustomMsg %></td>
  121.     </tr>
  122. <% End If %>
  123. <% If tblLPR.lprDate.Visible Then ' lprDate %>
  124.     <tr<%= tblLPR.lprDate.RowAttributes %>>
  125.         <td class="ewTableHeader">Date<span class="ewRequired"> *</span></td>
  126.         <td<%= tblLPR.lprDate.CellAttributes %>><span id="el_lprDate">
  127. <input type="text" name="x_lprDate" id="x_lprDate" value="<%= tblLPR.lprDate.EditValue %>"<%= tblLPR.lprDate.EditAttributes %> />
  128.  <img src="images/calendar.png" id="cal_x_lprDate" name="cal_x_lprDate" alt="Pick a date" style="cursor:pointer;cursor:hand;" />
  129. <script type="text/javascript">
  130. Calendar.setup({
  131.     inputField : "x_lprDate", // ID of the input field
  132.     ifFormat : "%m/%d/%Y", // the date format
  133.     button : "cal_x_lprDate" // ID of the button
  134. });
  135. </script>
  136. </span><%= tblLPR.lprDate.CustomMsg %></td>
  137.     </tr>
  138. <% End If %>
  139. <% If tblLPR.lprLocationID.Visible Then ' lprLocationID %>
  140.     <tr<%= tblLPR.lprLocationID.RowAttributes %>>
  141.         <td class="ewTableHeader">Location<span class="ewRequired"> *</span></td>
  142.         <td<%= tblLPR.lprLocationID.CellAttributes %>><span id="el_lprLocationID">
  143. <select id="x_lprLocationID" name="x_lprLocationID"<%= tblLPR.lprLocationID.EditAttributes %>>
  144. <%
  145. emptywrk = True
  146. If ew_IsArrayList(tblLPR.lprLocationID.EditValue) Then
  147.     arwrk = tblLPR.lprLocationID.EditValue
  148.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  149.         If ew_SameStr(arwrk(rowcntwrk)(0), tblLPR.lprLocationID.CurrentValue) Then
  150.             selwrk = " selected=""selected"""
  151.             emptywrk = False
  152.         Else
  153.             selwrk = ""
  154.         End If
  155. %>
  156. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  157. <%= arwrk(rowcntwrk)(1) %>
  158. </option>
  159. <%
  160.     Next
  161. End If
  162. %>
  163. </select>
  164. </span><%= tblLPR.lprLocationID.CustomMsg %></td>
  165.     </tr>
  166. <% End If %>
  167. <% If tblLPR.lprFixtureLocationID.Visible Then ' lprFixtureLocationID %>
  168.     <tr<%= tblLPR.lprFixtureLocationID.RowAttributes %>>
  169.         <td class="ewTableHeader">Fixture Location<span class="ewRequired"> *</span></td>
  170.         <td<%= tblLPR.lprFixtureLocationID.CellAttributes %>><span id="el_lprFixtureLocationID">
  171. <select id="x_lprFixtureLocationID" name="x_lprFixtureLocationID"<%= tblLPR.lprFixtureLocationID.EditAttributes %>>
  172. <%
  173. emptywrk = True
  174. If ew_IsArrayList(tblLPR.lprFixtureLocationID.EditValue) Then
  175.     arwrk = tblLPR.lprFixtureLocationID.EditValue
  176.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  177.         If ew_SameStr(arwrk(rowcntwrk)(0), tblLPR.lprFixtureLocationID.CurrentValue) Then
  178.             selwrk = " selected=""selected"""
  179.             emptywrk = False
  180.         Else
  181.             selwrk = ""
  182.         End If
  183. %>
  184. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  185. <%= arwrk(rowcntwrk)(1) %>
  186. </option>
  187. <%
  188.     Next
  189. End If
  190. %>
  191. </select>
  192. </span><%= tblLPR.lprFixtureLocationID.CustomMsg %></td>
  193.     </tr>
  194. <% End If %>
  195. <% If tblLPR.lprFixtureTypeID.Visible Then ' lprFixtureTypeID %>
  196.     <tr<%= tblLPR.lprFixtureTypeID.RowAttributes %>>
  197.         <td class="ewTableHeader">Fixture Type<span class="ewRequired"> *</span></td>
  198.         <td<%= tblLPR.lprFixtureTypeID.CellAttributes %>><span id="el_lprFixtureTypeID">
  199. <select id="x_lprFixtureTypeID" name="x_lprFixtureTypeID"<%= tblLPR.lprFixtureTypeID.EditAttributes %>>
  200. <%
  201. emptywrk = True
  202. If ew_IsArrayList(tblLPR.lprFixtureTypeID.EditValue) Then
  203.     arwrk = tblLPR.lprFixtureTypeID.EditValue
  204.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  205.         If ew_SameStr(arwrk(rowcntwrk)(0), tblLPR.lprFixtureTypeID.CurrentValue) Then
  206.             selwrk = " selected=""selected"""
  207.             emptywrk = False
  208.         Else
  209.             selwrk = ""
  210.         End If
  211. %>
  212. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  213. <%= arwrk(rowcntwrk)(1) %>
  214. </option>
  215. <%
  216.     Next
  217. End If
  218. %>
  219. </select>
  220. </span><%= tblLPR.lprFixtureTypeID.CustomMsg %></td>
  221.     </tr>
  222. <% End If %>
  223. <% If tblLPR.lprFixtureNumber.Visible Then ' lprFixtureNumber %>
  224.     <tr<%= tblLPR.lprFixtureNumber.RowAttributes %>>
  225.         <td class="ewTableHeader">Fixture Number</td>
  226.         <td<%= tblLPR.lprFixtureNumber.CellAttributes %>><span id="el_lprFixtureNumber">
  227. <input type="text" name="x_lprFixtureNumber" id="x_lprFixtureNumber" size="30" maxlength="255" value="<%= tblLPR.lprFixtureNumber.EditValue %>"<%= tblLPR.lprFixtureNumber.EditAttributes %> />
  228. </span><%= tblLPR.lprFixtureNumber.CustomMsg %></td>
  229.     </tr>
  230. <% End If %>
  231. <% If tblLPR.lprChannelNumber.Visible Then ' lprChannelNumber %>
  232.     <tr<%= tblLPR.lprChannelNumber.RowAttributes %>>
  233.         <td class="ewTableHeader">Channel Number<span class="ewRequired"> *</span></td>
  234.         <td<%= tblLPR.lprChannelNumber.CellAttributes %>><span id="el_lprChannelNumber">
  235. <input type="text" name="x_lprChannelNumber" id="x_lprChannelNumber" size="30" value="<%= tblLPR.lprChannelNumber.EditValue %>"<%= tblLPR.lprChannelNumber.EditAttributes %> />
  236. </span><%= tblLPR.lprChannelNumber.CustomMsg %></td>
  237.     </tr>
  238. <% End If %>
  239.  
  240. <% If tblLPR.lprSTID.Visible Then ' lprSTID %>
  241. <%  If Session("tfpssnet_Status_Userlevel") = -1 Or Session("tfpssnet_Status_UserLevel") = 3 Or Session("tfpssnet_Status_Userlevel") = 4 Then%>
  242.     <tr<%= tblLPR.lprSTID.RowAttributes %>>
  243.         <td class="ewTableHeader">Status<span class="ewRequired"> *</span></td>
  244.         <td<%= tblLPR.lprSTID.CellAttributes %>><span id="el_lprSTID">
  245. <select id="x_lprSTID" name="x_lprSTID"<%= tblLPR.lprSTID.EditAttributes %>>
  246. <%
  247. emptywrk = True
  248. If ew_IsArrayList(tblLPR.lprSTID.EditValue) Then
  249.     arwrk = tblLPR.lprSTID.EditValue
  250.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  251.         If ew_SameStr(arwrk(rowcntwrk)(0), tblLPR.lprSTID.CurrentValue) Then
  252.             selwrk = " selected=""selected"""
  253.             emptywrk = False
  254.         Else
  255.             selwrk = ""
  256.         End If
  257. %>
  258. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  259. <%= arwrk(rowcntwrk)(1) %>
  260. </option>
  261. <%
  262.     Next
  263. End If
  264. %>
  265. </select>
  266. </span><%= tblLPR.lprSTID.CustomMsg %></td>
  267.     </tr>
  268. <% End If %>
  269. <% End If %>
  270.  
  271. <% If tblLPR.lprPriority.Visible Then ' lprPriority %>
  272. <%  If Session("tfpssnet_Status_Userlevel") = -1 Or Session("tfpssnet_Status_UserLevel") = 3 Or Session("tfpssnet_Status_Userlevel") = 4 Then%>
  273.     <tr<%= tblLPR.lprPriority.RowAttributes %>>
  274.         <td class="ewTableHeader">Priority<span class="ewRequired"> *</span></td>
  275.         <td<%= tblLPR.lprPriority.CellAttributes %>><span id="el_lprPriority">
  276. <select id="x_lprPriority" name="x_lprPriority"<%= tblLPR.lprPriority.EditAttributes %>>
  277. <%
  278. emptywrk = True
  279. If ew_IsArrayList(tblLPR.lprPriority.EditValue) Then
  280.     arwrk = tblLPR.lprPriority.EditValue
  281.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  282.         If ew_SameStr(arwrk(rowcntwrk)(0), tblLPR.lprPriority.CurrentValue) Then
  283.             selwrk = " selected=""selected"""
  284.             emptywrk = False
  285.         Else
  286.             selwrk = ""
  287.         End If
  288. %>
  289. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  290. <%= arwrk(rowcntwrk)(1) %>
  291. </option>
  292. <%
  293.     Next
  294. End If
  295. %>
  296. </select>
  297. </span><%= tblLPR.lprPriority.CustomMsg %></td>
  298.     </tr>
  299. <% End If %>
  300. <% End If %>
  301.  
  302. <% If tblLPR.lprShortDesc.Visible Then ' lprShortDesc %>
  303.     <tr<%= tblLPR.lprShortDesc.RowAttributes %>>
  304.         <td class="ewTableHeader">Short Desc<span class="ewRequired"> *</span></td>
  305.         <td<%= tblLPR.lprShortDesc.CellAttributes %>><span id="el_lprShortDesc">
  306. <input type="text" name="x_lprShortDesc" id="x_lprShortDesc" size="30" maxlength="255" value="<%= tblLPR.lprShortDesc.EditValue %>"<%= tblLPR.lprShortDesc.EditAttributes %> />
  307. </span><%= tblLPR.lprShortDesc.CustomMsg %></td>
  308.     </tr>
  309. <% End If %>
  310. <% If tblLPR.lprDesc.Visible Then ' lprDesc %>
  311.     <tr<%= tblLPR.lprDesc.RowAttributes %>>
  312.         <td class="ewTableHeader">Description</td>
  313.         <td<%= tblLPR.lprDesc.CellAttributes %>><span id="el_lprDesc">
  314. <textarea name="x_lprDesc" id="x_lprDesc" cols="70" rows="10"<%= tblLPR.lprDesc.EditAttributes %>><%= tblLPR.lprDesc.EditValue %></textarea>
  315. </span><%= tblLPR.lprDesc.CustomMsg %></td>
  316.     </tr>
  317. <% End If %>
  318. </table>
  319.     <td width="10px"> </td>
  320.   <td width="250px"><font style="font-family: Arial, Helvetica, sans-serif; font-weight: bold; font-size: x-small; color: #FF0000">Be sure to inital and date your entry!</font>
  321.     <font style="font-size: xx-small; font-family: Arial, Helvetica, sans-serif">
  322.     <p>Give a short description of the problem that INCLUDES the answers to the following applicable questions;</p>
  323.     <p>- How long was the light powered on before the problem occurred?</p>
  324.     <p>- Did a reset temporarily resolve the problem?</p>
  325.     <p>- Does the light continue to respond to the board despite the problem or outage?</p>
  326.     <p>- Are there any errors displayed on the light?  If yes and you can read the errors, what are they?</p>
  327.     <p>- Was there anything different than normal during startup leading to the fault?</p>
  328.     <p>- Did the fixture have any audible or visibile indications leading up to the fault?</p>
  329.     <p> </p></font></td>
  330. </tr></table>
  331. <p />
  332. <input type="submit" name="btnAction" id="btnAction" value="    Add    " />
  333. </form>
  334. <script language="JavaScript" type="text/javascript">
  335. <!--
  336. // Write your table-specific startup script here
  337. // document.write("page loaded");
  338. //-->
  339. </script>
  340. </asp:Content>
  341.