Select Case e.Col.Name
Case "支出", "支出明细","支出科目"
If e.Row.IsNull("收入明细") = False Then 'AndAlso 'e.Row.Isnull("第二列") = False Then
e.Cancel = True
End If
End Select
Select Case e.Col.Name
Case "收入", "收入明细","收入科目"
If e.Row.IsNull("支出明细") = False Then 'AndAlso 'e.Row.Isnull("第二列") = False Then
e.Cancel = True
End If
End Select
'
Dim r As DataRow = DataTables("利润单").Find("订单编号 ='" & e.Row("订单编号") & "'") '准备修改当前表时,如果利润单的订单编号满足下面要求,那么锁定当前行(当两个表不是关联表时锁定的解决办法)
If r IsNot Nothing Then
If r("订单状态") = "3-业务审核" OrElse r("订单状态") = "4-订单完成" Then
e.cancel = True
End If
End If
If e.IsFocusCell
If e.Col.Name = "收入科目"
'Dim cmd As New SQLCommand
'cmd.CommandText = "SELECT 第一列,Count(第一列) as 记录数 From {表A} Group By 第一列"
'e.Col.Combolist = cmd.ExecuteReader.GetComboListString("第一列", "","记录数 Desc")
Dim g As New GroupTableBuilder("统计表1", DataTables("银行流水"))
g.Groups.AddDef("收入科目")
g.Totals.AddDef("收入科目", AggregateEnum.Count, "记录数")
g.Filter = "[收入科目] not is null"
g.Build(True)
Tables("银行流水").Cols("收入科目").Combolist = g.Build(True).GetComboListString("收入科目", "","记录数 Desc")
End If
End If
If User.Group <> "办公室" Then
e.cancel = True
End If
出的错误提示:
.NET Framework 版本:2.0.50727.5477
Foxtable 版本:2014.4.16.1
错误所在事件:表,银行流水,PrepareEdit
详细错误信息:
调用的目标发生了异常。
设置 DataSource 属性后无法修改项集合。
局域网Acc数据库
怎么改?
[此贴子已经被作者于2014-6-11 17:34:55编辑过]