Foxtable(狐表)用户栏目专家坐堂 → [原创]子表的删除行DataRowDeleted事件不能触发父表的DataColChanged事件的问题


  共有4860人关注过本帖平板打印复制链接

主题:[原创]子表的删除行DataRowDeleted事件不能触发父表的DataColChanged事件的问题

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


加好友 发短信
等级:婴狐 帖子:47 积分:441 威望:0 精华:0 注册:2018/10/6 18:05:00
  发帖心情 Post By:2019/1/15 17:32:00 [只看该作者]

子表的datacolchanged事件有重置列,子表的datacolchanged代码是这样的,

 

 

If (e.DataCol.Name = "PO单价" AndAlso Not(e.DataRow.IsNull("PO数量"))) OrElse (e.DataCol.Name = "PO数量"  AndAlso Not(e.DataRow.IsNull("PO单价"))) Then

    DataTables("orderlist").DataCols("需求总金额").RaiseDataColChanged("PO = '" & e.DataRow("PO") & "'")


End If


If e.DataCol.Name = "PO总价"  Then

    Dim dr2 As DataRow = e.DataRow
   
  If Not(dr2.IsNull("PO总价"))  Then

    Dim amount,xj,xc As Double
   
    amount = Math.Round(dr2("PO单价") * dr2("PO数量"),3)
    xj = Math.Abs(amount-dr2("PO总价"))
    xc = xj / dr2("PO总价")
   
   
    If  xj < 0.1 OrElse  xc <0.001  Then
            dr2("价格核对") = "核对正常"
    Else
            dr2("价格核对") = "核对异常"
    End If
  End If

End If


If e.DataCol.Name = "生产单号"  AndAlso Not(e.DataRow.IsNull("生产单号")) Then


e.DataRow("生产安排时间") = Date.Now()

End If


 回到顶部
总数 28 1 2 3 下一页