Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
参考 http://www.foxtable.com/webhelp/scr/1607.htm
Dim ndr As DataRow = DataTables("凭证表").AddNew
ndr("编号") = "xxxx"
ndr("借") = "xxx"
ndr("贷") = "xxxxxxxx"
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:管理项目1.table |
DataColChanged事件,参考代码
If e.DataCol.name = "审批" Then
If e.NewValue = True Then
Dim dt1 As DataTable = DataTables("凭证")
Dim dt2 As DataTable = DataTables("凭证明细")
Dim ndr As DataRow = dt1.addnew
ndr("日期") = Date.Today
ndr("凭证id") = e.DataRow("入库单号")
Dim cdr1 As DataRow = dt2.AddNew
cdr1("凭证id") = ndr("凭证id")
cdr1("会计科目_一级科目") = "原材料"
Dim cdr2 As DataRow = dt2.AddNew
cdr2("凭证id") = ndr("凭证id")
cdr2("会计科目_一级科目") = "应付账款"
cdr2("会计科目_明细科目") = e.DataRow("供应商名称")
End If
End If
参考代码
If e.DataCol.name = "审批" Then
If e.NewValue = True Then
Dim dt1 As DataTable = DataTables("凭证")
Dim dt2 As DataTable = DataTables("凭证明细")
Dim ndr As DataRow = dt1.addnew
ndr("日期") = Date.Today
ndr("凭证id") = e.DataRow("入库单号")
Dim cdr1 As DataRow = dt2.AddNew
cdr1("凭证id") = ndr("凭证id")
cdr1("会计科目_一级科目") = "原材料"
Dim cdr2 As DataRow = dt2.AddNew
cdr2("凭证id") = ndr("凭证id")
cdr2("会计科目_一级科目") = "应付账款"
cdr2("会计科目_明细科目") = e.DataRow("供应商名称")
Else
Dim dt1 As DataTable = DataTables("凭证")
Dim dt2 As DataTable = DataTables("凭证明细")
dt1.DeleteFor("凭证id = '" & e.DataRow("入库单号") & "'")
dt2.DeleteFor("凭证id = '" & e.DataRow("入库单号") & "'")
End If
End If