home *** CD-ROM | disk | FTP | other *** search
/ 66.142.0.142 / 66.142.0.142.tar / 66.142.0.142 / tblFixtureMasteredit.aspx < prev    next >
Text File  |  2010-08-26  |  8KB  |  163 lines

  1. <%@ Page Language="VB" MasterPageFile="masterpage.master" ValidateRequest="false" AutoEventWireup="false" CodeFile="tblFixtureMasteredit.aspx.vb" Inherits="tblFixtureMasteredit" CodeFileBaseClass="AspNetMaker7_tfpssnet" %>
  2. <asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
  3. <script type="text/javascript">
  4. <!--
  5. // Create page object
  6. var tblFixtureMaster_edit = new ew_Page("tblFixtureMaster_edit");
  7. // page properties
  8. tblFixtureMaster_edit.PageID = "edit"; // page ID
  9. var EW_PAGE_ID = tblFixtureMaster_edit.PageID; // for backward compatibility
  10. // extend page with ValidateForm function
  11. tblFixtureMaster_edit.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 + "_lfxMFG"];
  21.         if (elm && !ew_HasValue(elm))
  22.             return ew_OnError(this, elm, "Please enter required field - Manufacturer");
  23.         elm = fobj.elements["x" + infix + "_lfxModelType"];
  24.         if (elm && !ew_HasValue(elm))
  25.             return ew_OnError(this, elm, "Please enter required field - Model / Type");
  26.         elm = fobj.elements["x" + infix + "_lfxLocationID"];
  27.         if (elm && !ew_HasValue(elm))
  28.             return ew_OnError(this, elm, "Please enter required field - Location");
  29.         elm = fobj.elements["x" + infix + "_lfxHangPos"];
  30.         if (elm && !ew_HasValue(elm))
  31.             return ew_OnError(this, elm, "Please enter required field - Hang Pos");
  32.         elm = fobj.elements["x" + infix + "_lfxChannel"];
  33.         if (elm && !ew_HasValue(elm))
  34.             return ew_OnError(this, elm, "Please enter required field - Channel");
  35.         elm = fobj.elements["x" + infix + "_lfxChannel"];
  36.         if (elm && !ew_CheckInteger(elm.value))
  37.             return ew_OnError(this, elm, "Incorrect integer - Channel");
  38.     }
  39.     return true;
  40. }
  41. <% If EW_CLIENT_VALIDATE Then %>
  42. tblFixtureMaster_edit.ValidateRequired = true; // uses JavaScript validation
  43. <% Else %>
  44. tblFixtureMaster_edit.ValidateRequired = false; // no JavaScript validation
  45. <% End If %>
  46. //-->
  47. </script>
  48. <script language="JavaScript" type="text/javascript">
  49. <!--
  50. // Write your client script here, no need to add script tags.
  51. // To include another .js script, use:
  52. // ew_ClientScriptInclude("my_javascript.js"); 
  53. //-->
  54. </script>
  55. <p><span class="aspnetmaker">Edit TABLE: Fixture Master<br /><br />
  56. <a href="<%= tblFixtureMaster.ReturnUrl %>">Go Back</a></span></p>
  57. <% tblFixtureMaster_edit.ShowMessage() %>
  58. <form name="ftblFixtureMasteredit" id="ftblFixtureMasteredit" method="post" onsubmit="this.action=location.pathname;return tblFixtureMaster_edit.ValidateForm(this);">
  59. <p />
  60. <input type="hidden" name="a_table" id="a_table" value="tblFixtureMaster" />
  61. <input type="hidden" name="a_edit" id="a_edit" value="U" />
  62. <table cellspacing="0" class="ewGrid"><tr><td class="ewGridContent">
  63. <div class="ewGridMiddlePanel">
  64. <table cellspacing="0" class="ewTable">
  65. <% If tblFixtureMaster.lfxMFG.Visible Then ' lfxMFG %>
  66.     <tr<%= tblFixtureMaster.lfxMFG.RowAttributes %>>
  67.         <td class="ewTableHeader">Manufacturer<span class="ewRequired"> *</span></td>
  68.         <td<%= tblFixtureMaster.lfxMFG.CellAttributes %>><span id="el_lfxMFG">
  69. <input type="text" name="x_lfxMFG" id="x_lfxMFG" size="30" maxlength="255" value="<%= tblFixtureMaster.lfxMFG.EditValue %>"<%= tblFixtureMaster.lfxMFG.EditAttributes %> />
  70. </span><%= tblFixtureMaster.lfxMFG.CustomMsg %></td>
  71.     </tr>
  72. <% End If %>
  73. <% If tblFixtureMaster.lfxModelType.Visible Then ' lfxModelType %>
  74.     <tr<%= tblFixtureMaster.lfxModelType.RowAttributes %>>
  75.         <td class="ewTableHeader">Model / Type<span class="ewRequired"> *</span></td>
  76.         <td<%= tblFixtureMaster.lfxModelType.CellAttributes %>><span id="el_lfxModelType">
  77. <input type="text" name="x_lfxModelType" id="x_lfxModelType" size="30" maxlength="255" value="<%= tblFixtureMaster.lfxModelType.EditValue %>"<%= tblFixtureMaster.lfxModelType.EditAttributes %> />
  78. </span><%= tblFixtureMaster.lfxModelType.CustomMsg %></td>
  79.     </tr>
  80. <% End If %>
  81. <% If tblFixtureMaster.lfxSerialNumber.Visible Then ' lfxSerialNumber %>
  82.     <tr<%= tblFixtureMaster.lfxSerialNumber.RowAttributes %>>
  83.         <td class="ewTableHeader">Serial Number</td>
  84.         <td<%= tblFixtureMaster.lfxSerialNumber.CellAttributes %>><span id="el_lfxSerialNumber">
  85. <input type="text" name="x_lfxSerialNumber" id="x_lfxSerialNumber" size="30" maxlength="255" value="<%= tblFixtureMaster.lfxSerialNumber.EditValue %>"<%= tblFixtureMaster.lfxSerialNumber.EditAttributes %> />
  86. </span><%= tblFixtureMaster.lfxSerialNumber.CustomMsg %></td>
  87.     </tr>
  88. <% End If %>
  89. <% If tblFixtureMaster.lfxLamp.Visible Then ' lfxLamp %>
  90.     <tr<%= tblFixtureMaster.lfxLamp.RowAttributes %>>
  91.         <td class="ewTableHeader">Lamp</td>
  92.         <td<%= tblFixtureMaster.lfxLamp.CellAttributes %>><span id="el_lfxLamp">
  93. <input type="text" name="x_lfxLamp" id="x_lfxLamp" size="30" maxlength="255" value="<%= tblFixtureMaster.lfxLamp.EditValue %>"<%= tblFixtureMaster.lfxLamp.EditAttributes %> />
  94. </span><%= tblFixtureMaster.lfxLamp.CustomMsg %></td>
  95.     </tr>
  96. <% End If %>
  97. <% If tblFixtureMaster.lfxLocationID.Visible Then ' lfxLocationID %>
  98.     <tr<%= tblFixtureMaster.lfxLocationID.RowAttributes %>>
  99.         <td class="ewTableHeader">Location<span class="ewRequired"> *</span></td>
  100.         <td<%= tblFixtureMaster.lfxLocationID.CellAttributes %>><span id="el_lfxLocationID">
  101. <select id="x_lfxLocationID" name="x_lfxLocationID"<%= tblFixtureMaster.lfxLocationID.EditAttributes %>>
  102. <%
  103. emptywrk = True
  104. If ew_IsArrayList(tblFixtureMaster.lfxLocationID.EditValue) Then
  105.     arwrk = tblFixtureMaster.lfxLocationID.EditValue
  106.     For rowcntwrk As Integer = 0 To arwrk.Count - 1
  107.         If ew_SameStr(arwrk(rowcntwrk)(0), tblFixtureMaster.lfxLocationID.CurrentValue) Then
  108.             selwrk = " selected=""selected"""
  109.             emptywrk = False
  110.         Else
  111.             selwrk = ""
  112.         End If
  113. %>
  114. <option value="<%= ew_HtmlEncode(arwrk(rowcntwrk)(0)) %>"<%= selwrk %>>
  115. <%= arwrk(rowcntwrk)(1) %>
  116. </option>
  117. <%
  118.     Next
  119. End If
  120. %>
  121. </select>
  122. </span><%= tblFixtureMaster.lfxLocationID.CustomMsg %></td>
  123.     </tr>
  124. <% End If %>
  125. <% If tblFixtureMaster.lfxHangPos.Visible Then ' lfxHangPos %>
  126.     <tr<%= tblFixtureMaster.lfxHangPos.RowAttributes %>>
  127.         <td class="ewTableHeader">Hang Pos<span class="ewRequired"> *</span></td>
  128.         <td<%= tblFixtureMaster.lfxHangPos.CellAttributes %>><span id="el_lfxHangPos">
  129. <input type="text" name="x_lfxHangPos" id="x_lfxHangPos" size="30" maxlength="255" value="<%= tblFixtureMaster.lfxHangPos.EditValue %>"<%= tblFixtureMaster.lfxHangPos.EditAttributes %> />
  130. </span><%= tblFixtureMaster.lfxHangPos.CustomMsg %></td>
  131.     </tr>
  132. <% End If %>
  133. <% If tblFixtureMaster.lfxChannel.Visible Then ' lfxChannel %>
  134.     <tr<%= tblFixtureMaster.lfxChannel.RowAttributes %>>
  135.         <td class="ewTableHeader">Channel<span class="ewRequired"> *</span></td>
  136.         <td<%= tblFixtureMaster.lfxChannel.CellAttributes %>><span id="el_lfxChannel">
  137. <input type="text" name="x_lfxChannel" id="x_lfxChannel" size="30" value="<%= tblFixtureMaster.lfxChannel.EditValue %>"<%= tblFixtureMaster.lfxChannel.EditAttributes %> />
  138. </span><%= tblFixtureMaster.lfxChannel.CustomMsg %></td>
  139.     </tr>
  140. <% End If %>
  141. <% If tblFixtureMaster.lfxNotes.Visible Then ' lfxNotes %>
  142.     <tr<%= tblFixtureMaster.lfxNotes.RowAttributes %>>
  143.         <td class="ewTableHeader">Notes</td>
  144.         <td<%= tblFixtureMaster.lfxNotes.CellAttributes %>><span id="el_lfxNotes">
  145. <textarea name="x_lfxNotes" id="x_lfxNotes" cols="35" rows="4"<%= tblFixtureMaster.lfxNotes.EditAttributes %>><%= tblFixtureMaster.lfxNotes.EditValue %></textarea>
  146. </span><%= tblFixtureMaster.lfxNotes.CustomMsg %></td>
  147.     </tr>
  148. <% End If %>
  149. </table>
  150. </div>
  151. </td></tr></table>
  152. <input type="hidden" name="x_lfxID" id="x_lfxID" value="<%= ew_HTMLEncode(tblFixtureMaster.lfxID.CurrentValue) %>" />
  153. <p />
  154. <input type="submit" name="btnAction" id="btnAction" value="  Submit  " />
  155. </form>
  156. <script language="JavaScript" type="text/javascript">
  157. <!--
  158. // Write your table-specific startup script here
  159. // document.write("page loaded");
  160. //-->
  161. </script>
  162. </asp:Content>
  163.