以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助] 表属性中的代码转成窗口中的按钮代码  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=128156)

--  作者:sanny
--  发布时间:2018/11/29 23:10:00
--  [求助] 表属性中的代码转成窗口中的按钮代码

版主,请问将以下表属性中的代码转成窗口中的按钮代码需改哪些 ? 麻烦。

 

If e.DataCol.Name = "Import" AndAlso e.DataRow("Import") = True Then
    Dim Result As DialogResult
    If Tables("shipment").current("shippingNo") = Nothing Then
        Result = Messagebox.Show("新增 !!!","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If Result = DialogResult.Yes Then
            Tables("shipment").addnew
        End If
    Else
       
       
          If e.DataCol.Name = "Import" AndAlso e.DataRow("Import") = True Then
            Dim nma() As String = {"PO","Customer","Customer_POno","PO_Pos","GSSPartNo","Customer_PartNo","Qty_PerBox","delivery_address","ETD"} \'
            Dim nmb() As String =

{"PO","Endcustomer","CustomerPO","Pos","GSSPart","PartNo","OpenQty","DeliveryAddress","ETD"}
           
            Dim dr As Row = Tables("Shipment.Packinglist").AddNew
           
            For i As Integer = 0 To nma.Length - 1
                dr(nma(i)) = e.DataRow(nmb(i))
            Next
        End If
       
   End If
End If


--  作者:有点甜
--  发布时间:2018/11/30 9:19:00
--  
Dim r As Row = Tables("表A").current
If r("Import") = True Then
    Dim Result As DialogResult
    If Tables("shipment").current("shippingNo") = Nothing Then
        Result = Messagebox.Show("新增 !!!","提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
        If Result = DialogResult.Yes Then
            Tables("shipment").addnew
        End If
    Else
        If r("Import") = True Then
            Dim nma() As String = {"PO","Customer","Customer_POno","PO_Pos","GSSPartNo","Customer_PartNo","Qty_PerBox","delivery_address","ETD"} \'
            Dim nmb() As String ={"PO","Endcustomer","CustomerPO","Pos","GSSPart","PartNo","OpenQty","DeliveryAddress","ETD"}
           
            Dim dr As Row = Tables("Shipment.Packinglist").AddNew
           
            For i As Integer = 0 To nma.Length - 1
                dr(nma(i)) = r(nmb(i))
            Next
        End If
       
    End If
End If

--  作者:sanny
--  发布时间:2018/11/30 19:14:00
--  

版主 ,

 

Dim r As Row = Tables("表A").current

这个只能选择第一个记录,改成

 

Dim r As Row in Tables("表A").rows  哪儿错了。我是要选返全部选中的记录后执行代码,谢谢。


--  作者:有点蓝
--  发布时间:2018/11/30 20:12:00
--  
for each r As Row in Tables("表A").rows

next