以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教更正逻辑型列表达式  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=22082)

--  作者:SZDVYE
--  发布时间:2012/8/2 0:49:00
--  请教更正逻辑型列表达式

请教代码出错,不知道如何将逻辑列:"结关"   "取消"与其他数值列统一:

表达式部分如下:

Select Case e.DataCol.Name

    Case "结算客户","结关","取消"

        Dim dr As DataRow = e.DataRow

        Dim pr As DataRow

        If dr.IsNull("结算客户") Then

            dr("操作") = Nothing

            dr("录入") = Nothing

            dr("定金") = Nothing

          Else

          Dim filter As String

            filter = "结算客户 = \'" & dr("结算客户") & "\' And 结关 = 1 Or 取消 = 1 "

            pr = DataTables("报价表").Find(filter)

            If pr IsNot Nothing And "结关" = 1 Then

                dr("操作") = pr("操作")

                dr("录入") = pr("录入")

            ElseIf pr IsNot Nothing And "取消" = 1 Then

                dr("定金") = pr("定金")

             End If

End Select

 

错误代码图片如下:

 

              


此主题相关图片如下:1.jpg
按此在新窗口浏览图片

--  作者:狐狸爸爸
--  发布时间:2012/8/2 9:57:00
--  

第一:

 

If pr IsNot Nothing And "结关" = 1 Then

 

改为:

 

If pr IsNot Nothing And pr("结关") = 1 Then

 

第二:

 

ElseIf pr IsNot Nothing And "取消" = 1 Then

 

改为:

 


ElseIf pr IsNot Nothing And pr("取消") = 1 Then