PdcCalculation.Refresh: Difference between revisions
Jump to navigation
Jump to search
Created page with "== Declaration == == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability ==" |
No edit summary |
||
Line 1: | Line 1: | ||
== Declaration == | == Declaration == | ||
Refresh | |||
== Description == | == Description == | ||
Repaint the form of the calculation object | |||
== Notes == | == Notes == | ||
This method refreshes the calculation form. | |||
Beware that this is really only a refresh not a save! | |||
== Code example == | == Code example == | ||
This code example creates a new calculation, reads a standard calculation into it, changes the production quantity and saves it. Then the calculation is shown on screen, after which another change is made (CustomerArticleNumber). This is not shown on screen until after the refresh method is called. | |||
Alternatively, use the property pdcCalculation.AutoRefresh = true to ensure that every change from the script is shown immediately in the form. | |||
<source lang="vb"> | <source lang="vb"> | ||
dim objCalc | |||
set objCalc = pdc.NewCalculation | |||
if objCalc.ReadFromArticle("1234") then | |||
objCalc.OrderQuantity = 3 | |||
objCalc.Save | |||
objCalc.Show | |||
objCalc.CustomerArticleNo = "4321" | |||
objCalc.Refresh | |||
else | |||
msgbox "Could not read article" | |||
end if | |||
</source> | </source> | ||
== Availability == | == Availability == |
Latest revision as of 08:40, 21 May 2012
Declaration
Refresh
Description
Repaint the form of the calculation object
Notes
This method refreshes the calculation form.
Beware that this is really only a refresh not a save!
Code example
This code example creates a new calculation, reads a standard calculation into it, changes the production quantity and saves it. Then the calculation is shown on screen, after which another change is made (CustomerArticleNumber). This is not shown on screen until after the refresh method is called. Alternatively, use the property pdcCalculation.AutoRefresh = true to ensure that every change from the script is shown immediately in the form.
dim objCalc
set objCalc = pdc.NewCalculation
if objCalc.ReadFromArticle("1234") then
objCalc.OrderQuantity = 3
objCalc.Save
objCalc.Show
objCalc.CustomerArticleNo = "4321"
objCalc.Refresh
else
msgbox "Could not read article"
end if