<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/LISADATACONNECT.asp" -->
<!--#include file="dim_F.asp" -->
<%' This is the only thing that we need in this page for getting the records from the BillerScanX table
Set BilletScanX_cmd = Server.CreateObject ("ADODB.Command")
BilletScanX_cmd.ActiveConnection = MM_LISADATACONNECT_STRING
BilletScanX_cmd.CommandText = "SELECT TOP 50 BilletID, TagNumber, ScanTo, DateScanned, TagGroup FROM BilletScanX"
BilletScanX_cmd.Prepared = true
Set rs_BilletScanX = BilletScanX_cmd.Execute
Set BilletScanX_DS_cmd = Server.CreateObject("ADODB.Command")
BilletScanX_DS_cmd.ActiveConnection=MM_LISADATACONNECT_STRING
BilletScanX_DS_cmd.Prepared = true
BilletScanX_DS_cmd.commandtext = "SELECT BilletID, TagNumber, ScanTo, DateScanned, TagGroup, TagShift FROM BilletScanX"
Set rs_BilletScanX_DS = BilletScanX_DS_cmd.Execute
' This gets the values from the form
strTN = trim(Request.Form("TagNumber"))
strON = trim(Request.Form("OperatrName"))
strDS = trim(request.Form("RipDefectTimeDate"))
strRW = trim(Request.Form("RipWidth"))
strD = trim(Request.Form("Delam"))
strMB = trim(Request.Form("M_Blow"))
strUB = trim(Request.Form("U_Blow"))
strRE = trim(Request.Form("RoughEdge"))
strS = trim(Request.Form("Slip"))
strO = trim(Request.Form("Other"))
mmrec = int(Request.Form("MM_recordId"))
' This checks to see if the Form has been passed, if so, then process the form and retrieve it's data
if request.Form("MM_insert")="form1" then
Set MM_editCmd = CreateObject ("ADODB.Command")
MM_editCmd.ActiveConnection = MM_LISADATACONNECT_STRING
MM_InsertCmd = "insert into RipsawBilletUsage (TagNumber, OperatorName, DateScanned, RipWidth, Delam, M_Blow, U_Blow, RoughEdge, Slip, Other)values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
'response.Write"strTN - "&strTN&" <br />strON - "&strON&" <br />strRW - "&strRW&" <br />strD - "&strD&" <br />strMB - "&strMB&" <br />strUB - "&strUB&" <br />strRE - "&strRE&" <br />strS - "&strS&" <br />strO - "&strO&" <br />mmrec - "&mmrec&" <br />"
'response.End()
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@TagNumber", 201, 1, 50, strTN) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@OperatorName", 201, 1, 50, strON) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@DateScanned", 201, 1, 50, strDS) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@RipWidth", 201, 1, 50, strRW) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@Delam", 201, 1, 50, strD) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@M_Blow", 201, 1, 50, strMB) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@U_Blow", 201, 1, 50, strUB) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@RoughEdge", 201, 1, 50, strRE) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@Slip", 201, 1, 50, strS) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@Other", 201, 1, 50, strO) ' adLongVarChar
MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("@RipDefectID", 5, 1, ,mmrec) ' adDouble
MM_editCmd.CommandText=MM_InsertCmd
MM_editCmd.Execute
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Billet Scan Defects</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #FFFFFF;
background-image: url(images/lightlogo60.gif);
}
.style5 {
color: #FFFFFF;
font-weight: bold;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
<%'This is the CSS information for Page: cr3.asp%>
#MainTable{
width:1100px;
border:1px;
background-color:#CCCCCC;
padding:1px; /*cellpadding*/
border-spacing:1px; /*cellspacing*/
}
.tdResults{
text-align:center;
border:1px #999999 dotted;
}
.tdResult{
text-align:left;
border:1px #333333 double;
}
-->
</style>
<script type="text/javascript">
if(window.addEventListener){
window.addEventListener('load',switchme,false);
}
else {
if(window.attachEvent){
window.attachEvent('onload',switchme);
}
}
function switchme(){
df=document.forms[0];
df[0].onchange=function(){
switch(this.value) {
<%
While NOT rs_BilletScanX_DS.EOF
'the df[2] line:35 & 42 this is the form Element Number, For the Fieldname: RipDefectTimeDate DO NOT CHANGE%>
case '<%=rs_BilletScanX_DS("TagNumber")%>':
df[2].value='<%=rs_BilletScanX_DS("DateScanned")%>';
break;
<%rs_BilletScanX_DS.movenext
wend%>
default:
df[2].value='';
break;
}
}
}
</script>
</head>
<body>
<form name="form1" method="POST" action="">
<table border="2" cellpadding="2" cellspacing="0" bordercolor="#000000" background="images/lightlogo60.gif" id="BilletDefects">
<tr bgcolor="#000000">
<td><span class="style5">Tag Number </span></td>
<td><span class="style5">Oper. Name</span></td>
<td><span class="style5">Date Scanned</span></td>
<td><span class="style5">Rip Width Inch</span></td>
<td><span class="style5">Rip Width MM</span></td>
<td><span class="style5">No. of Delams</span></td>
<td><span class="style5">No. of M-Blows</span></td>
<td><span class="style5">No. of U-Blows</span></td>
<td><span class="style5"> Rough Edges</span></td>
<td><span class="style5">No. o f Slips</span></td>
<td><span class="style5">Comments</span></td>
<td> </td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rs_BilletScanX.EOF))
rs_BilletScanX.MoveNext
Wend
%>
<tr bgcolor="#FFFFFF">
<td><select name="TagNumber">
<option value="Choose One" selected="selected">Choose One</option>
<%While NOT rs_BilletScanX.EOF%>
<option value="<%=rs_BilletScanX("TagNumber")%>"><%=rs_BilletScanX("TagNumber")%></option>
<%rs_BilletScanX.movenext
wend%>
</select> </td>
<%
OpName = trim(request.Form("OperatrName"))
%>
<div id="ExtraInfos">Select search option</div>
<td><input type="text" size="10" name="OperatrName" value="<%=Session("OpName")%>"></td>
<td><input name="RipDefectTimeDate" type="text" size="10"></td>
<td><input type="text" size="10" name="RipWidth"></td>
<td><input type="text" size="10" name="RipWidth2"></td>
<td><input type="text" size="10" name="Delam"></td>
<td><input type="text" size="10" name="M_Blow"></td>
<td><input type="text" size="10" name="U_Blow"></td>
<td><input type="text" size="10" name="RoughEdge"></td>
<td><input type="text" size="10" name="Slip"></td>
<td><input type="text" size="10" name="Other"></td>
<%'I had to move these hidden form elements over here, as they were messing up my Form Count DO NOT MOVE!!!!!%>
<td colspan="5" rowspan="2"><span class="style5"></span><span class="style5"></span><span class="style5"></span><span class="style5"></span>
<input type="hidden" name="Grade">
<input type="hidden" name="Thickness">
<input type="hidden" name="Length">
<input type="hidden" name="Pieces">
<input type="hidden" name="shift"></td>
<%'End of moved 'hidden' form elements DO NOT MOVE!!!!!!!!!!%>
</tr>
</table>
<input type="submit" name="Submit" value="Submit">
<input type="hidden" name="MM_insert" value="form1">
</form>
<%'Now we need to get all the records that have been inserted%>
<!--#include file="cr3_F.asp"-->
</body>
</html>
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190: