--系統參數設定

select smenu,mdes1,s_dll,opt from m_sysmen where call1 = 'DATAB000' 


--尚不知用途

select s_type,s_year,s_month,s_day,s_seq  from m_syshad where sprg='DELM1001'


  • --功能選單-第一層

--if uppercase(frmmain.s_usrid) = 'SUPADM' then

select * from m_sysmen where smenu='maimcs00' and sts2='*' order by seqno

--else

select a.*,b.enabl as enabl from m_sysmen a

left join m_sysgrm b on a.call1=b.smenu

where a.sts2='*'and a.smenu='maimcs00' and b.grpno='00' and b.sprg='' order by a.smenu,a.seqno


  • --功能選單-第二層

select a.*,b.enabl as enabl from m_sysmen a

left join m_sysgrm b on a.smenu=b.smenu  and a.call1=b.sprg

where a.sts2='*'and a.smenu='DATA0000' and b.grpno='00' order by a.seqno --userInfo.Grop  


smenu依照第一層的call1查出所有的第二層資料



綜合以上理解後結果:

--選單第一層

select * from m_sysmen where smenu='maimcs00' and sts2='*' order by seqno

--選單第二層

select * from m_sysmen where  call1 in (select sprg from m_sysgrm where smenu='DATA0000' and grpno='00')


  • 第二層選單的特殊規則:

--當m_sysusr.ssecu>1 則不能顯示這個選單

select * from m_sysmen where call1 in ('REPM3000','DATAA000','DATAB000')



  • --使用者群組

select * from m_sysgrp


  • --使用者帳號

select * from m_sysusr


select * from m_sysusr

select * from m_sysgpur --使用者與群組的對應表

select * from m_sysgrp --群組

select * from m_sysgrm --群組對應的功能選單

select * from m_sysmen --功能選單

Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework