<% ' ' 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")<>"") %> 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 (RunReport=False AND RunInvtReport=False) then %> <% 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 %>

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

<% ' generate vendor input forms automatically oVendor.call "set_psAutoEntryLabelStart", "" oVendor.call "set_psAutoEntryDataStart", "" oVendor.call "get_AutoEntry","Vendor" %>
<% else %> <% ' If here we are generating a report. Could be one of two reports %> <% if RunReport then %> <% ' If here we are generating a report for all Vendors %>

Vendor List

<% oVendor.call "get_autoreport","Vendor", Index ,"Vendor0.asp", 0, 0 %> <% else %> <% ' If here we are generating an Invt report for the selected Vendor %>

Vendor Parts List

<% ' If we list only for Vendor we must get the current Vendor ' rowid and pass it to the VDF report VRowId = request("Vendor__RowId") ' this calls the Vdf report passing row Id and the URLs to link ' the report back to the Invt or Vendor entry screen. oInvt.call "msg_SetHRefName", "Invt.asp" oInvt.call "msg_SetVendorHRefName", "Vendor0.asp" oInvt.call "msg_RunVndrInvtList", VRowId %> <%end if %> <%end if %>