Question:
When archiving a data table, you must check whether the data can be saved. If not, a dialog box is displayed, asking the user to choose whether to archive the data.
Problem Analysis:
1) in the archive script, add a dialog box to judge and execute the corresponding action based on the user's choice.
PS: in this way, you need to modify the archive script file of Oracle PLSQL. I have not found the relevant information to implement the Add dialog box and then execute the corresponding action.
2) Before archiving the IFS custom interface, add a check action during the process,
If it can be saved, it will be archived directly
If not, a dialog box is displayed, asking the user to select whether to archive and then perform the corresponding action.
PS: This method is feasible. The following method is used to solve the problem:
1): define related variables
In Windows Variables
Boolean: nreturn
String: sfullname
String: sbwcode
Number: nresult
(2): Modify the pm_datasourcesave message.
On pm_datasourcesave select case (wparam) Case method_inquire return salsendclassmessage (pm_datasourcesave, wparam, lparam) Case method_execute set sfullname = ': hwndform.' | average (hwndform)
-- Call dbplsqlblock (c_hsql, sfullname | '. nreturn: = & AO. hpub_item_api.check_gf ('| sfullname | '. colsglassfabric, '| sfullname | '. colsbwcode) ') If nreturn <1 call dbplsqlblock (c_hsql, sfullname | '. nreturn: = & AO. hpub_item_api.check_gf ('| sfullname | '. colsgfcode, '| sfullname | '. colsbwcode) ') Check Result OK. If it can be saved, it will be archived directly.
If nreturn <1 return salsendclassmessage (pm_datasourcesave, wparam, lparam)
-- The check result requires a dialog box. If you click "no", the else if alertbox ('gf_code or bw_code is error, will save record? ', Caption_warning, question_yesno) = IDNO return false
-- The check result must be displayed in the dialog box. When you click "yes", archive else return salsendclassmessage (pm_datasourcesave, wparam, lparam) by foreveryday007 20061025
Http://blog.csdn.net/foreveryday007