Foxtable(狐表)用户栏目专家坐堂 → 这个是什么意思?


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

主题:这个是什么意思?

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


加好友 发短信
等级:五尾狐 帖子:1062 积分:9781 威望:0 精华:0 注册:2012/3/13 5:23:00
这个是什么意思?  发帖心情 Post By:2012/6/23 6:10:00 [只看该作者]

代码如下 : 是代码的问题么?

 

 

Select  e.DataCol.Name
    Case = "商城","客户名称","店铺名称","_Identify"
        If e.DataRow.IsNull("商城") OrElse e.DataRow.IsNull("客户名称") OrElse e.DataRow.IsNull("店铺名称")  Then
            e.DataRow("取货商品名") = Nothing
        Else
            Dim bh As String = "QF-"  &e.DataRow("商城") & "-"  &e.DataRow("店铺名称") & "-" & e.DataRow("客户名称")  & "-" & e.DataRow("_Identify")       '生成该月编号的前缀
            Dim idx As Integer
            idx = e.DataTable.Compute("Count(取货商品名)","取货商品名 like '" & bh _
            & "*' and [_identify] < " & e.DataRow("_identify") & " ") +1
            e.DataRow("取货商品名") = bh  
        End If
End Select
If e.DataCol.Name = "客户名称" Then '发生变化的是客户名吗?
       Dim dr As DataRow
    dr = DataTables("客户资料").Find("name2 = " & "'" & e.DataRow("客户名称") & "'" )
    If dr IsNot Nothing '如果找到, 则设置各列内容
        e.DataRow("邮箱")= dr("qq") & "@QQ.com"
      
    End If
End If

 

Dim aa As Integer= e.DataRow("应取数量")-e.DataRow("已取数量")
If e.DataRow("应取数量") <> 0 And aa >0 Then
e.DataRow ("状态")= 2
Else If e.DataRow("应取数量") <> 0 And aa <=0 Then
e.DataRow ("状态")= 6
Else
Dim tbl As Table = Tables("取货录入表")
    If tbl.Current IsNot Nothing Then
             Tables("取货录入表").Current("状态") = e.DataRow("状态")
     
End If


图片点击可在新窗口打开查看此主题相关图片如下:??.png
图片点击可在新窗口打开查看

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


加好友 发短信
等级:八尾狐 帖子:1812 积分:12993 威望:0 精华:14 注册:2008/10/11 18:07:00
  发帖心情 Post By:2012/6/23 7:06:00 [只看该作者]

朦一下:


Dim dr,dr1 As DataRow

Dim idx As Integer

dr = e.DataRow

Select  e.DataCol.Name

    Case "商城","客户名称","店铺名称"

        If dr.IsNull("商城") OrElse dr.IsNull("客户名称") OrElse dr.IsNull("店铺名称")  Then

            dr("取货商品名") = Nothing

        Else

            Dim bh As String = "QF-"  & dr("商城") & "-"  & dr("店铺名称") & "-" & dr("客户名称")  & "-" & dr("_Identify")       '生成该月编号的前缀

            'idx = e.DataTable.Compute("Count(取货商品名)","取货商品名 like '" & bh & "*' and [_identify] < " & dr("_identify")) +1  '這idx沒有引用它,應該不要 

            dr("取货商品名") = bh

        End If

    Case  "客户名称"   

        dr1 = DataTables("客户资料").Find("name2 = " & "'" & dr("客户名称") & "'" )

        If dr1 IsNot Nothing '如果找到, 则设置各列内容

            dr1("邮箱")= dr("qq") & "@QQ.com"

        End If

    Case  "应取数量","已取数量"

        idx = dr("应取数量")-dr("已取数量")

        If dr("应取数量") <> 0 AndAlso  idx >0 Then

            dr ("状态")= 2

        ElseIf dr("应取数量") <> 0 AndAlso  idx < = 0 Then

            dr ("状态")= 6

        Else

            Dim tbl As Table = Tables("取货录入表")

            If tbl.Current IsNot Nothing Then

                Tables("取货录入表").Current("状态") = dr("状态")

            End If

        End If

End Select


 回到顶部