& "“",cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
RST1.MoveFirst
do while not rst1.EOF
Listbox1.addItem cstr(rst1.Fields("bmName"))
rst1.MoveNext
loop
end if
rst1.Close
rst1.Open "select zgsname from zgs ",cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
rst1.MoveFirst
do while not rst1.EOF
Listbox2.addItem cstr(rst1.Fields("zgsname"))
rst1.MoveNext
loop
end if
rst1.Close
cnn1.close
Checkbox1.setChecked (true)
case "2"“部门经理
Listbox1.addItem session("bm")
rst1.Open "select zgsname from zgs where bmid=" & session("bmid"),cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
rst1.MoveFirst
do while not rst1.EOF
Listbox2.addItem cstr(rst1.Fields("zgsname"))
rst1.MoveNext
loop
end if
rst1.Close
cnn1.close
Checkbox1.setChecked (true)
“Checkbox1.0
case "1"“会计
rst1.Open "select bmName from bm ",cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
RST1.MoveFirst
do while not rst1.EOF
Listbox1.addItem cstr(rst1.Fields("bmName"))
rst1.MoveNext
loop
end if
rst1.Close
rst1.Open "select zgsname from zgs ",cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
rst1.MoveFirst
do while not rst1.EOF
Listbox2.addItem cstr(rst1.Fields("zgsname"))
rst1.MoveNext
loop
end if
rst1.Close
cnn1.close
case "4"“院长
rst1.Open "select bmName from bm ",cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
RST1.MoveFirst
do while not rst1.EOF
Listbox1.addItem cstr(rst1.Fields("bmName"))
rst1.MoveNext
loop
end if
rst1.Close
rst1.Open "select zgsname from zgs ",cnn1,1,1,adcmdtext
if rst1.RecordCount >0 then
rst1.MoveFirst
do while not rst1.EOF
Listbox2.addItem cstr(rst1.Fields("zgsname"))
rst1.MoveNext
loop
end if
rst1.Close
cnn1.close
end select
end if
…………
end function
'按照权限查询凭证
sub button1_onclick
dim rst2,cnn2,str,i
dim bm(1),zgs(1),xmz(1),xm(1),szfx(1),szxs(1),rq(2),jbr(1)
bm(0)=Checkbox1.getChecked()
if bm(0) then
bm(1)=Listbox1.getText(Listbox1.selectedIndex )
str=" and bm=“" & bm(1) & "“"
end if
zgs(0)=Checkbox2.getChecked()
if zgs(0) then
用ASP实现分级权限控制(3)
内容版权声明:除非注明,否则皆为本站原创文章。