标题: 请教:如何使用case语句 [打印本页] 作者: urral 时间: 2006-7-7 15:46 标题: 请教:如何使用case语句 JavaWindow("System User Management").JavaDialog("Create New User").JavaEdit("Account").Set DataTable("account", dtGlobalSheet)
上面account是被参数化了的。我想实现当account取第一个参数时执行如下语句:
JavaWindow("System User Management").JavaDialog("Create New User").JavaList("JList").Select "Administrator"
取第二个参数时执行:
JavaWindow("System User Management").JavaDialog("Create New User").JavaList("JList").Select "operator"
用case语句应该怎么写呢?作者: xiaonan 时间: 2006-7-7 15:58
dim user
select case user
case "Administrator" JavaWindow("System User Management").JavaDialog("Create New User").JavaList("JList").Select "Administrator"
case "operator" JavaWindow("System User Management").JavaDialog("Create New User").JavaList("JList").Select "operator"
end selelct作者: urral 时间: 2006-7-7 16:20
但没有和account的 DataTable联系起来啊?作者: wanghaijun 时间: 2006-7-7 17:10
Dim currentRow
currentRow = DataTable.GetCurrentRow
Select Case currentRow
Case 1
JavaWindow("System User Management").JavaDialog("Create New User").JavaList("JList").Select "Administrator"
Case 2
JavaWindow("System User Management").JavaDialog("Create New User").JavaList("JList").Select "operator"
End Select