Foxtable(狐表)用户栏目专家坐堂 → 代码纠错


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

主题:代码纠错

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


加好友 发短信
等级:一尾狐 帖子:461 积分:4265 威望:0 精华:0 注册:2019/8/5 17:49:00
代码纠错  发帖心情 Post By:2020/1/16 16:56:00 [只看该作者]

Select Case e.DataCol.Name
    Case "审批结果1","审批人1","审批结果2","审批人2","审批结果3","审批人3","审批结果4","审批人4","审批结果5","审批人5","审批人6","审批日期6","审批日期7","审批人7"
        Dim dr As DataRow = e.DataRow
        
        If dr.IsNull("审批结果1") = False AndAlso dr.IsNull("审批人1") = False Then
            e.DataRow("进度") = "2A"
            If dr.IsNull("审批结果2") = False AndAlso dr.IsNull("审批人2") = False Then
                e.DataRow("进度") = "3A"
                If dr.IsNull("审批结果3") = False AndAlso dr.IsNull("审批人3") = False Then
                    e.DataRow("进度") = "4A"
                    If dr.IsNull("审批结果4") = False AndAlso dr.IsNull("审批人4") = False Then
                        e.DataRow("进度") = "5A"
                        If dr.IsNull("审批结果5") = False AndAlso dr.IsNull("审批人5") = False  AndAlso dr("维修厂") = User.IsRole("维修厂审核员") Then
                            e.DataRow("进度") = "6A"
                        If dr.IsNull("审批结果5") = False AndAlso dr.IsNull("审批人5") = False  AndAlso dr("维修厂") <> User.IsRole("维修厂审核员") Then
                            e.DataRow("进度") = "7A"
                                             
                        If dr.IsNull("审批人6") = False AndAlso dr.IsNull("审批日期6") = False Then
                            e.DataRow("进度") = "7A"
                            
                        End If
                    End If
                End If
            End If
        End If
    End If
End If
看红色部分,我写的不报错,但是无效,怎么写字段“维修厂” (下拉框) 是否属于指定的角色


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:105473 积分:536350 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/1/16 17:06:00 [只看该作者]

If dr.IsNull("审批结果4") = False AndAlso dr.IsNull("审批人4") = False Then
    e.DataRow("进度") = "5A"
    If dr.IsNull("审批结果5") = False AndAlso dr.IsNull("审批人5") = False
        If User.IsRole(dr("维修厂")) Then
            e.DataRow("进度") = "6A"
        Else
            e.DataRow("进度") = "7A"
        End If
        If dr.IsNull("审批人6") = False AndAlso dr.IsNull("审批日期6") = False Then
            e.DataRow("进度") = "7A"
        End If
    End If
End If

 回到顶部