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

<%= FormatDateTime(Date,1) %>

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

<%=error%>

<% error="" End If %>

Supply Category:
Supply Name:
Item Number:
Supply Description:
 


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