<%@ Language=VBScript %> <%Response.Buffer=True%> <% Updated = Request.QueryString("Updated") %> <% PageTitle = "SiteManager - Edit Part" %> <% PageID=400 %> <% Header %> <% Menu PageID %> <%' Main body of page goes here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <%partedit%> <%' End Of Main body ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %> <% Footer %> <% Sub partedit%>

<%= FormatDateTime(Date,1) %>

<% PartID = Request.QueryString("PID") Response.Buffer=True error = "" OpenConnection1 SET rs=Server.CreateObject("ADODB.Recordset") If Request.Form("hidSave")="true" then nCatID = Request.Form("selCat") txtPart = dbReplace(Trim(Request.Form("txtPart"))) txtDescription=dbReplace(Trim(Request.Form("txtDescription"))) txtItemNumber = dbReplace(Trim(Request.Form("txtItemNumber"))) If txtItemNumber<>"" AND txtPart<>"" Then SQL="SELECT * FROM Parts WHERE PartID=" & PartID rs.Open SQL,DB,1,3 If rs.EOF then rs.Close Response.Redirect("part_details.asp?PID=" & PartID) Else rs("nCatID") = nCatID rs("txtPart") = txtPart rs("txtDescription")=txtDescription rs("txtItemNumber") = txtItemNumber rs.Update rs.Close Response.Redirect("part_details.asp?PID=" & PartID) End If End If If TRIM(Request.Form("txtPart"))="" then error = "A Part Name is required.
" End If If Trim(txtItemNumber)="" then error=error & "A Part Item Number is required.
" End If Else SEL = "SELECT * FROM Parts WHERE PartID="&PartID rs.Open SEL,DB,1,3 nCatID=rs("nCatID") txtPart=tbPrep(rs("txtPart")) txtDescription=tbPrep(rs("txtDescription")) txtItemNumber=tbPrep(rs("txtItemNumber")) rs.Close End If %> <% If error <> "" Then%>

<%=error%>

<% error="" End If %>

Part Category:
Part Name:
Item Number:
Part Description:
 


<%End Sub %> <% Function IsSelected(value,data) If value=data then IsSelected="Selected" Else IsSelected="" End If End Function %>