# Customized Panes for 'xxxxxxxx' Created: 2010/03/03
# PANE:Job Information
[PANE]
ADMIN ARSPENLZ 01001Job Information 090settings\ADMIN_VBS_ARSPEN01.XML 000000500000ARSPEN010M000 0000 00000
[VBSCRIPT]
' This script contains functions for form and field events.
' You must not modify the name of the functions.
Option Explicit
Function CustomizedPane_OnLoad()
Dim FormProps
FormProps = "
"
CustomizedPane.CodeObject.FormProperties = FormProps
End Function
Function CustomizedPane_OnRefresh()
' Specify the variables to be used when calling the business object
dim XMLOut, XMLParam, Job, FormData
CustomizedPane.CodeObject.UpdateFormValues = " "
' Populate the Job variable with the refresh value
Job = CustomizedPane.CodeObject.RefreshValue
if Job = "" then
exit function
end if
' Build up the XML to be passed to the business object
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
XMLParam = XMLParam & " "
on error resume next
' Call the business object, supplying the XML and putting the result in to XMLOut
XMLOut = CallBO("WIPQRY",XMLParam,"auto")
if err then
exit function
end if
' Switch on error handling
on error goto 0
' Define the variables required for extracting the information from the DOM.
Dim XMLDoc, JobNum, JobDesc, JobClass, ClassDesc, JobType, MasterJob, StockCode, StockDesc, Rev
Dim Rel, WH, Priority, Cust, CustName, Price, Conf, Hold, Comp, DateCalc, Tender, Del, Start, QtyToMake
Dim QtyMan, Scrapped, ExpLabour, ExpMat, TotalLab, TotalMat, LabCostToDate1, MatCostToDate1, WIPValue, IssuesFromWIP
' Load the output from the business object in to the DOM
Set XMLDoc = createobject("MSXML2.DOMDocument")
XMLDoc.async = false
XMLDoc.LoadXML(XMLOut)
' Populate the values for the fields
JobNUm = XMLDoc.SelectSingleNode("//Job").Text
JobDesc = XMLDoc.SelectSingleNode("//JobDescription").Text
JobClass = XMLDoc.SelectSingleNode("//JobClassification").Text
ClassDesc = XMLDoc.SelectSingleNode("//ClassDescription").Text
JobType = XMLDoc.SelectSingleNode("//JobType").Text
MasterJob = XMLDoc.SelectSingleNode("//MasterJob").Text
StockCode = XMLDoc.SelectSingleNode("//StockCode").Text
StockDesc = XMLDoc.SelectSingleNode("//StockDescription").Text
Rev = XMLDoc.SelectSingleNode("//Version").Text
Rel = XMLDoc.SelectSingleNode("//Release").Text
WH = XMLDoc.SelectSingleNode("//Warehouse").Text
Priority = XMLDoc.SelectSingleNode("//Priority").Text
Cust = XMLDoc.SelectSingleNode("//Customer").Text
CustName = XMLDoc.SelectSingleNode("//CustomerName").Text
Price = XMLDoc.SelectSingleNode("//SellingPrice").Text
Conf = XMLDoc.SelectSingleNode("//ConfirmedFlag").Text
Hold = XMLDoc.SelectSingleNode("//HoldFlag").Text
Comp = XMLDoc.SelectSingleNode("//Complete").Text
DateCalc = XMLDoc.SelectSingleNode("//DateCalcMethod").Text
Tender = XMLDoc.SelectSingleNode("//JobTenderDate").Text
Del = XMLDoc.SelectSingleNode("//JobDeliveryDate").Text
Start = XMLDoc.SelectSingleNode("//JobStartDate").Text
QtyToMake = XMLDoc.SelectSingleNode("//QtyToMake").Text
QtyMan = XMLDoc.SelectSingleNode("//QtyManufactured").Text
Scrapped = XMLDoc.SelectSingleNode("//TotalQtyScrapped").Text
ExpLabour = XMLDoc.SelectSingleNode("//ExpLabour").Text
ExpMat = XMLDoc.SelectSingleNode("//ExpMaterial").Text
TotalLab = XMLDoc.SelectSingleNode("//ExpectedOperationCost").Text
TotalMat = XMLDoc.SelectSingleNode("//ExpectedMaterialCost").Text
LabCostToDate1 = XMLDoc.SelectSingleNode("//LabCostToDate1").Text
MatCostToDate1 = XMLDoc.SelectSingleNode("//MatCostToDate1").Text
WIPValue = XMLDoc.SelectSingleNode("//WIPValue").Text
IssuesFromWIP = XMLDoc.SelectSingleNode("//IssuesFromWIP").Text
FormData = ""
CustomizedPane.CodeObject.UpdateFormValues = FormData
End Function
Function CleanData(InString)
Dim newString
newString = Replace(InString, "&", "&")
newString = Replace(newString, """", """)
newString = Replace(newString, "'", "'")
newString = Replace(newString, "<", "<")
newString = Replace(newString, ">", ">")
CleanData = newString
End Function