ORACLE FORM中,如何使用警告?
DECLARE
I NUMBER;
BEGIN
SET_ALERT_BUTTON_PROPERTY('警告名',ALERT_BUTTON1,LABEL,'提示1');
SET_ALERT_BUTTON_PROPERTY('警告名',ALERT_BUTTON2,LABEL,'提示2');
SET_ALERT_BUTTON_PROPERTY('警告名',ALERT_BUTTON3,LABEL,'提示3');
SET_ALERT_PROPERTY('警告名',ALERT_MESSAGE_TEXT,'提示信息');
SET_ALERT_PROPERTY('警告名',TITLE,'标题');
I:=SHOW_ALERT('警告名');
IF I=ALERT_BUTTON1 THEN
MESSAGE('.......');
ELSIF I=ALERT_BUTTON2 THEN
MESSAGE('.......');
ELSIF I=ALERT_BUTTON3 THEN
MESSAGE('.......');
END IF;
END;
例如:
在退出按钮中
DECLARE
I NUMBER;
BEGIN
SET_ALERT_BUTTON_PROPERTY('ALERT',ALERT_BUTTON1,LABEL,'退出');
SET_ALERT_BUTTON_PROPERTY('ALERT',ALERT_BUTTON2,LABEL,'返回');
SET_ALERT_PROPERTY('ALERT',ALERT_MESSAGE_TEXT,'是否退出');
SET_ALERT_PROPERTY('ALERT',TITLE,'询问');
I:=SHOW_ALERT('ALERT');
IF I=ALERT_BUTTON1 THEN
EXIT_FORM(ASK_COMMIT);
ELSE
GO_BLOCK(块名);
END IF;
END;
在删除按钮上
DECLARE
I NUMBER;
BEGIN
SET_ALERT_BUTTON_PROPERTY('ALERT',ALERT_BUTTON1,LABEL,'是(Y)');
SET_ALERT_BUTTON_PROPERTY('ALERT',ALERT_BUTTON2,LABEL,'否(N)');
SET_ALERT_PROPERTY('ALERT',ALERT_MESSAGE_TEXT,'是否删除?);
SET_ALERT_PROPERTY('ALERT',TITLE,'询问');
I:=SHOW_ALERT('ALERT');
IF I=ALERT_BUTTON1 THEN
DELETE_RECORD;
ELSE
GO_BLOCK(块名);
END IF;
END;
|Archiver|小黑屋|手机版|壹佰网 ERP100
( 京ICP备19053597号-2 )
GMT+8, 2025/11/30 11:42 , Processed in 0.010557 second(s), 12 queries , File On.
Powered by Discuz! X3.4
Copyright © 2001-2020, Tencent Cloud.