<% ' ' Vendor Entry and Maintenance ' 'Initialize Standard Information Index = request("Index") ' The last selected Index number RowId = request("RowId") ' If a row Id was passed RunReport = (request("RunReport")<>"") ' If run report was selected RunInvtReport = (request("ListParts")<>"") ' If run report was selected %> <% ' redirects must occur before any html output! If RunReport then Response.redirect ("VendorList.asp?RunReport=1&Index=" & Index) end if If RunInvtReport then VendorRowId = Request("Vendor__Rowid") Response.redirect ("InvtList.asp?RunReport=2&VendorRowID=" & VendorRowId) end if %> Vendor <% ' LoginRights: If 1 user has full rights, if 0 or -1, browse only rights %> <% LoginRights = request.cookies("Rights") %> " TYPE="text/css"> <% CheckFieldChange=oVendor.call("get_peFieldMultiUser") %> <% ' DebugMode =1 ' uncomment this for page get/post debug help %> <% If LoginRights = "1" then %>

Vendor Entry and Maintenance

<% else %>

Vendor Query

<% end if %> <% oVendor.call "set_pbReportErrors", 1 'normally show any errors that occur 'We either find a record, or clear the WBO If RowId <> "" Then Err = oVendor.RequestFindbyRowId( "Vendor", RowId) else Err = oVendor.RequestClear("Vendor",1) End if ' process various buttons that might have been pressed. ' only support Post submissions If request("Request_method")="POST" Then if Request("clear")<>"" then Err = oVendor.RequestClear("Vendor",1) end if if Request("save")<>"" then oVendor.call "set_pbReportErrors", 0 err = oVendor.RequestSave("Vendor") if err = 0 then Response.Write("

Vendor record saved

") else Response.Write("") Response.Write("

Could not save changes. Errors Occurred

") oVendor.call "msg_ReportAllErrors" Response.Write("
") end if end if if Request("delete")<>"" then oVendor.call "set_pbReportErrors", 0 Err = oVendor.RequestDelete("Vendor") if err = 0 then Response.Write("

The record has been deleted.

") else Response.Write("") Response.Write("

The record could not be deleted.

") oVendor.call "msg_ReportAllErrors" Response.Write("
") end if end if ' note we use the Index variable we created above if Request("findprev") <>"" then Err = oVendor.RequestFind("Vendor", Index, LT) if Request("find") <>"" then Err = oVendor.RequestFind("Vendor", Index, GE) if Request("findnext") <>"" then Err = oVendor.RequestFind("Vendor", Index, GT) if Request("findfirst")<>"" then Err = oVendor.RequestFind("Vendor", Index, FIRST_RECORD) if Request("findlast") <>"" then Err = oVendor.RequestFind("Vendor", Index, LAST_RECORD) end if %>
<% ' You MUST have a hidden rowid field for each DDO in your WBO %> " > <% ' This is needed if you need field level change state checking %>

Find by <% oVendor.call "get_CreateFindIndexCombo", "Index", "Vendor", Index %> <% if oVendor.ddvalue("Vendor.RowId") <> "" then %> <% end if%> <% If LoginRights = "1" then %>    <% end if %>

<%FieldError=oVendor.DDValue("Vendor.Id",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.Name",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.Address",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.City",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.State",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.Zip",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.Phone_Number",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oVendor.DDValue("Vendor.Fax_Number",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %>
<%=oVendor.DDValue("Vendor.Id",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.Id",DDFORM)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.Name",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.Name",DDFORM)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.Address",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.Address",DDFORM)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.City",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.City",DDFORM)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.State",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.State",DDCOMBO)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.Zip",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.Zip",DDFORM)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.Phone_Number",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.Phone_Number",DDFORM)%> <%=FieldError%>
<%=oVendor.DDValue("Vendor.Fax_Number",DDLONGLABEL,1)%> <%=oVendor.DDValue("Vendor.Fax_Number",DDFORM)%> <%=FieldError%>