<% ' ' Sales Person 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 %> <% ' redirects must occur before any html output! If RunReport then Response.redirect ("SalesPList.asp?RunReport=1&Index=" & Index) end if %> Sales Person Report <% ' LoginRights: If 1 user has full rights, if 0 or -1, browse only rights %> <% LoginRights = request.cookies("Rights") %> " TYPE="text/css"> <% CheckFieldChange=oSalesP.call("get_peFieldMultiUser") %> <% ' DebugMode =1 ' uncomment this for page get/post debug help %> <% If LoginRights = "1" then %>

Sales Person Entry and Maintenance

<% else %>

Sales Person Query

<% end if %> <% oSalesP.call "set_pbReportErrors", 1 'normally show any errors that occur 'We either find a record, or clear the WBO If RowId <> "" Then Err = oSalesP.RequestFindbyRowId( "Salesp", RowId) else Err = oSalesP.RequestClear("Salesp",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 = oSalesP.RequestClear("Salesp",1) end if if Request("save")<>"" then oSalesP.call "set_pbReportErrors", 0 err = oSalesP.RequestSave("Salesp") if err = 0 then Response.Write("

Salesp record saved

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

Could not save changes. Errors Occurred

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

The record has been deleted.

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

The record could not be deleted.

") oSalesP.call "msg_ReportAllErrors" Response.Write("
") end if end if ' note we use the Index variable we created above if Request("findprev") <>"" then Err = oSalesP.RequestFind("Salesp", Index, LT) if Request("find") <>"" then Err = oSalesP.RequestFind("Salesp", Index, GE) if Request("findnext") <>"" then Err = oSalesP.RequestFind("Salesp", Index, GT) if Request("findfirst")<>"" then Err = oSalesP.RequestFind("Salesp", Index, FIRST_RECORD) if Request("findlast") <>"" then Err = oSalesP.RequestFind("Salesp", 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 <% oSalesP.call "get_CreateFindIndexCombo", "Index", "SalesP", Index %> <% If LoginRights = "1" then %>    <% end if %>

<%FieldError=oSalesP.DDValue("Salesp.Id",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oSalesP.DDValue("Salesp.Name",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %>
<%=oSalesP.DDValue("Salesp.Id",DDLONGLABEL,1)%> <%=oSalesP.DDValue("Salesp.Id",DDFORM)%> <%=FieldError%>
<%=oSalesP.DDValue("Salesp.Name",DDLONGLABEL,1)%> <%=oSalesP.DDValue("Salesp.Name",DDFORM)%> <%=FieldError%>