以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  自动添加输入  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=62678)

--  作者:有点甜
--  发布时间:2015/1/6 9:53:00
--  

  你等级这么大了,连这个最基本的还不会?

 

 http://www.foxtable.com/help/topics/1459.htm

 


--  作者:Bin
--  发布时间:2015/1/6 9:56:00
--  
DataColChanged事件

If e.DataCol.name="顾客称呼" AndAlso e.DataRow.IsNull("顾客称呼")=False Then
  Dim dr As DataRow = DataTables("客户资源").Find("顾客称呼=\'" & e.NewValue & "\'")
  If dr Is Nothing Then
     dr = DataTables("客户资源").AddNew
     dr("顾客称呼")=e.NewValue
  End If
End If

--  作者:有点甜
--  发布时间:2015/1/6 9:59:00
--  

DataCochanged事件

 

If e.DataCol.Name = "顾客称呼" AndAlso e.NewValue <> Nothing Then
    Dim fdr As DataRow = DataTables("客户资源").Find("顾客称呼 = \'" & e.NewValue & "\'")
    If fdr Is Nothing Then
        fdr = DataTables("客户资源").AddNew
        fdr("顾客称呼") = e.DataRow("顾客称呼")
    End If
End If