'///统计表datacolchanged事件
Dim dr As DataRow = e.DataRow
Dim dt As DataTable =DataTables("名册")
If e.DataCol.name = "车间" And e.DataRow.IsNull(e.DataCol.name) = False Then
For Each dc As DataCol In e.DataTable.DataCols
If dc.name.StartsWith("技术等级") Then
Dim c As String = dc.name.SubString(dc.Name.IndexOf("_")+1)
dr(dc.name)= dt.Compute("Count(姓名)", "车间 = '"& dr("车间") &"' And 技术等级 = '"& c &"' And 离厂日期 is null")
ElseIf dc.name = "在册人数" Then
dr(dc.name)= dt.Compute("Count(姓名)", "车间 = '"& dr("车间") &"' And 离厂日期 Is null")
End If
Next
End If