我设置这个表默认不加载任务数据 这个代码就有问题 怎么从后台去查询?
If e.DataCol.Name = "提交日期" AndAlso e.DataRow.IsNull("序号") AndAlso e.NewValue IsNot Nothing Then
Dim bh As String = Format(e.NewValue,"yyyyMMdd") '取得编号的8位前缀
Dim max As String
Dim idx As Integer
max = e.DataTable.Compute("Max(序号)","提交日期 = #" & e.NewValue & "# And [_Identify] <> " & e.DataRow("_Identify")) '取得该天的最大序号
If max > "" Then '如果存在最大编号
idx = CInt(max.Substring(9)) + 1 '获得最大编号的后三位顺序号,并加1
Else
idx = 1 '否则顺序号等于1
End If
e.DataRow("序号") = bh & "-" & Format(idx,"000")
End If