:parameter.p_prtno := v_Svdictateno;
exit;--退出循环
end if;
n_count1:=n_count1+1;
end loop;
end if;
exception when others then
display_note(sqlerrm||sqlcode,:global.logon_user);
END;
--
--当保存记录时控制:同一物料质量编号不能相同。
DECLARE
row_count NUMBER; --记录行数
row_num number; --所新建或修改记录行数
V_PRTLOTNO t_srmchkproject.prtlotno%type; --质量编号
BEGIN
--获取当前记录行数
row_num := :system.trigger_record;
first_record;
loop
row_count:=:system.trigger_record;
V_PRTLOTNO := :t_srmchkproject.prtlotno;
GO_RECORD(ROW_COUNT + 1);
loop
--若质量编号相同
if v_prtlotno = :t_srmchkproject.prtlotno then
display_note(’同种物料的质量编号不能相同!请改正。’,:global.logon_user);
go_item(’t_srmchkproject.prtlotno’);
return;--返回
--exit;
end if;
exit when :system.last_record = ’TRUE’; [Page]
next_record;
end loop;
GO_RECORD(ROW_COUNT+1); --用以最后一行记录判断
exit when :system.last_record = ’TRUE’;
--返回外层循环记录
GO_RECORD(ROW_COUNT);
next_record;
end loop;
commit_form;
--返回当前记录
go_record(row_num);
EXCEPTION WHEN OTHERS THEN NULL;
END;
--
--自动定位树结构的焦点
DECLARE
htree item;
find_node Ftree.NODE;
begin
htree:= Find_Item(’T_BOM1.BOM’);
find_node := FTREE.FIND_TREE_NODE(htree,:T_PRTBASDEF_CREATE.PRTNO,FTREE.FIND_NEXT,FTREE.NODE_VALUE,FTREE.ROOT_NODE,FTREE.ROOT_NODE);
IF NOT Ftree.ID_NULL(find_node) then --如果存在对应的节点
--pause;
FTREE.SET_TREE_SELECTION(htree, FIND_NODE, FTREE.SELECT_TOGGLE);
end if;
end;
--
--杀死死进程
select SID, serial#, USERNAME, SCHEMANAME, STATUS, OSUSER, OSUSER,TERMINAL, PROGRAM, LOGON_TIME from v$session;
ALTER SYSTEM KILL SESSION ’’;
--
select func.DECODEPASSWD(password) from t_user where username = ’’;
select func.ENCODEPASSWD(password) from t_user where username = ’’;
--用户权限
(:GLOBAL.LOGON_USER in (select object from t_roleuser where role=MODIFER and flag=’0’) or MODIFER=:GLOBAL.LOGON_USER)
--
--列表项
DECLARE
v_n Number;
BEGIN
v_n := populate_group(’rec_ptype’);
populate_list(’t_freesb.prntno’,’rec_ptype’);
END;
--提示对话框
set_alert_property(’note_alert’,alert_message_text,’口令更改成功!’);
return_value := show_alert(’note_alert’);
--
--改变按钮标签文本
DECLARE
v_Count NUMBER;
v_Label VARCHAR2(100);--记录“全选按钮”的标签文本
BEGIN
Go_Block(’user_col_comments’);
v_Label := Get_Item_Property(’Blk_Control.Btn_Select_Col’, Label);
First_Record;
IF v_Label = ’+’ THEN
LOOP
/*SELECT COUNT(*)
INTO v_Count
FROM t_Fieldrole
WHERE Table_Name = :User_Col_Comments.Table_Name
AND Column_Name = :User_Col_Comments.Column_Name
AND Role = :t_Fieldrole.Role;*/
--IF v_Count = 0 THEN
:User_Col_Comments.Chk_Select := 1;
--END IF;
EXIT WHEN :System.Last_Record = ’TRUE’;
NEXT_RECORD;
END LOOP;
First_Record;
Set_Item_Property(’Blk_Control.Btn_Select_Col’, Label,’-’); [Page]
Set_Item_Property(’Blk_Control.Btn_Select_Col’, TOOLTIP_TEXT,’取消选择’);
ELSIF v_Label = ’-’ THEN
First_Record;
LOOP
:User_Col_Comments.Chk_Select := 0;
EXIT WHEN :System.Last_Record = ’TRUE’;
NEXT_RECORD;
END LOOP;
First_Record;
Set_Item_Property(’Blk_Control.Btn_Select_Col’, Label,’+’);
Set_Item_Property(’Blk_Control.Btn_Select_Col’, TOOLTIP_TEXT,’选取全部’);
END IF;
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
--