帮忙看一看
帮忙看一看有什么问题??这是两个自定义变量1.
PARAMETER PDM
SQLEXEC(G_PUBLIC(6),'select count(*) AS QX from mmb where 人员代码=?THISFORM.TEXT1.VALUE AND 权限代码=?PDM ')
IF THISFORM.TEXT1.VALUE = 'SYS' .OR. SQLRESULT.QX > 0
RETURN .T.
ELSE
RETURN .T.
ENDIF
2.
PARAMETER PQX , PZ
IF PZ
SQLEXEC(G_PUBLIC(6),'IF (SELECT COUNT(*) FROM MMB WHERE 人员代码=?THISFORM.TEXT1.VALUE AND 权限代码=?M.PQX)=0 '+'INSERT INTO MMB VALUES(?THISFORM.TEXT1.VALUE,?M.PQX)')
ELSE
SQLEXEC(G_PUBLIC(6),'delete mmb where 人员代码=?THISFORM.TEXT1.VALUE AND 权限代码=?M.PQX')
ENDIF
3.
SELECT MMA
THISFORM.TEXT1.VALUE = MMA.人员代码
THISFORM.TEXT2.VALUE = MMA.姓名
THISFORM.CHECK68.VALUE = THISFORM.QX(68)
THISFORM.CHECK69.VALUE = THISFORM.QX(69)
THISFORM.CHECK84.VALUE = THISFORM.QX(84)
THISFORM.CHECK92.VALUE = THISFORM.QX(92)
THISFORM.CHECK93.VALUE = THISFORM.QX(93)
THISFORM.CHECK94.VALUE = THISFORM.QX(94)
THISFORM.CHECK95.VALUE = THISFORM.QX(95)
THISFORM.CHECK96.VALUE = THISFORM.QX(96)
THISFORM.CHECK97.VALUE = THISFORM.QX(97)
THISFORM.CHECK98.VALUE = THISFORM.QX(98)
THISFORM.CHECK99.VALUE = THISFORM.QX(99)
THISFORM.CHECK100.VALUE = THISFORM.QX(100)
THISFORM.CHECK101.VALUE = THISFORM.QX(101)
THISFORM.CHECK102.VALUE = THISFORM.QX(102)
THISFORM.CHECK103.VALUE = THISFORM.QX(103)
THISFORM.CHECK104.VALUE = THISFORM.QX(104)
SQLEXEC(G_PUBLIC(6),'select 权限代码 AS QX from mmb where 人员代码=?THISFORM.TEXT1.VALUE ')
IF THISFORM.TEXT1.VALUE = 'SYS'
SELECT BARNAME,QX FROM MENU WHERE .F. ORDER BY QX INTO CURSOR MMY1
ELSE
SELECT BARNAME,QX FROM MENU WHERE MENU=CC(1) and QX not IN(SELECT QX FROM SQLRESULT) AND QX>0 ORDER BY QX INTO CURSOR MMY1
ENDIF
IF THISFORM.TEXT1.VALUE = 'SYS'
SELECT BARNAME,QX FROM MENU WHERE QX > 0 ORDER BY QX INTO CURSOR MYY1
ELSE
SELECT BARNAME,QX FROM MENU WHERE MENU=CC(1) and QX IN(SELECT QX FROM SQLRESULT) AND QX > 0 ORDER BY QX INTO CURSOR MYY1
ENDIF
SELECT 0
USE DBF('MMY1') AGAIN ALIAS MMY
USE IN MMY1
SELECT 0
USE DBF('MYY1') AGAIN ALIAS MYY
USE IN MYY1
SELECT MMY
GO TOP
SELECT MYY
GO TOP
THISFORM.LIST1.ROWSOURCE = 'MMY.BARNAME'
THISFORM.LIST2.ROWSOURCE = 'MYY.BARNAME'
THISFORM.LIST1.LISTITEMID = 1
THISFORM.LIST2.LISTITEMID = 1
THISFORM.REFRESH
[此贴子已经被作者于2005-12-24 21:32:47编辑过]