<% ' ' Customer 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 ("CustomerList.asp?RunReport=1&Index=" & Index) end if %> Customer <% ' LoginRights: If 1 user has full rights, if 0 or -1, browse only rights %> <% LoginRights = request.cookies("Rights") %> " TYPE="text/css"> <% CheckFieldChange=oCustomer.call("get_peFieldMultiUser") %> <% ' DebugMode =1 ' uncomment this for page get/post debug help %> <% If LoginRights = "1" then %>

Customer Entry and Maintenance

<% else %>

Customer Query

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

Customer record saved

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

Could not save changes. Errors Occurred

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

The record has been deleted.

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

The record could not be deleted.

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

<%FieldError=oCustomer.DDValue("Customer.Customer_Number",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Name",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Address",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Status",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.City",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.State",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Zip",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Phone_Number",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Fax_Number",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Email_Address",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Credit_Limit",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Purchases",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Balance",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %> <%FieldError=oCustomer.DDValue("Customer.Comments",DDFIELDERROR) %> <% If FieldError<>"" then %> <% end if %>
<%=oCustomer.DDValue("Customer.Customer_Number",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Customer_Number",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Name",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Name",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Address",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Address",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Status",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Status",DDRADIO,"Active|Inactive")%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.City",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.City",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.State",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.State",DDCOMBO)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Zip",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Zip",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Phone_Number",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Phone_Number",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Fax_Number",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Fax_Number",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Email_Address",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Email_Address",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Credit_Limit",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Credit_Limit",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Purchases",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Purchases",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Balance",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Balance",DDFORM)%> <%=FieldError%>
<%=oCustomer.DDValue("Customer.Comments",DDLONGLABEL,1)%> <%=oCustomer.DDValue("Customer.Comments",DDEDIT,60)%> <%=FieldError%>