Foxtable(狐表)用户栏目专家坐堂 → 请问这个多条件判断的代码该如何写?


  共有5898人关注过本帖树形打印复制链接

主题:请问这个多条件判断的代码该如何写?

帅哥哟,离线,有人找我吗?
lsy
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:5246 积分:33163 威望:0 精华:8 注册:2013/1/17 21:28:00
  发帖心情 Post By:2014/4/14 8:13:00 [显示全部帖子]

Select e.DataCol.Name
    Case "A","B","C","D"
        Dim s1() As String = {"优","良","中","及格"}
        Dim s2() As String = {"D","C","B","A"}
        For i As Integer = 0 To s1.Length - 1
            If e.DataRow.IsNull(s2(i)) = False Then
                e.DataRow("E") = s1(i)
                Exit For
            End If
        Next
        If e.DataRow.IsNull(s2(0)) = False Then
            e.DataRow("F") = True
        End If
End Select

 回到顶部