以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  下面的代码怎么改才能放到 按钮的事件中呢?  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=31233)

--  作者:jinzhengbe
--  发布时间:2013/4/12 9:48:00
--  下面的代码怎么改才能放到 按钮的事件中呢?

If e.Col.name = "发货" Then
    e.Row("状态")= 7
e.Row("发货时间")= Date.now
e.Row("是否显示")=True
End If

Dim Cols1() As String = {"取货id","取货商品名","客户名","已取数量","备注"}
Dim Cols2() As String = {"取货id","商品名称","客户名","件数","备注"}
Dim dr1 As Row = Tables("发货详单_table1").Current
    Dim dr2 As DataRow = DataTables("发货详单").AddNew()
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next

Syscmd.Row.HideSelectedRows()


--  作者:Bin
--  发布时间:2013/4/12 9:50:00
--  

Tables("表A").Current("状态")= 7
Tables("表A").Current("发货时间")= Date.now
Tables("表A").Current("是否显示")=True

Dim Cols1() As String = {"取货id","取货商品名","客户名","已取数量","备注"}
Dim Cols2() As String = {"取货id","商品名称","客户名","件数","备注"}
Dim dr1 As Row = Tables("发货详单_table1").Current
    Dim dr2 As DataRow = DataTables("发货详单").AddNew()
    For i As Integer = 0 To Cols1.Length -1
        dr2(Cols2(i)) = dr1(Cols1(i))
    Next
Syscmd.Row.HideSelectedRows()
[此贴子已经被作者于2013-4-12 9:52:02编辑过]

--  作者:jinzhengbe
--  发布时间:2013/4/15 0:14:00
--  非常非常感谢
非常非常感谢