谢谢,如果是在表属性里写的程序,怎么加入,如下边代码
Select Case e.DataCol.Name
Case "单位代码"
e.DataRow("转任") = DataTables("人员增减").Compute("Count(_Identify)", "进入渠道 = 1 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("调任") = DataTables("人员增减").Compute("Count(_Identify)", "进入渠道 = 2 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("交流") = DataTables("人员增减").Compute("Count(_Identify)", "进入渠道 = 3 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("军转") = DataTables("人员增减").Compute("Count(_Identify)", "进入渠道 = 4 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("考录") = DataTables("人员增减").Compute("Count(_Identify)", "进入渠道 = 5 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("过渡") = DataTables("人员增减").Compute("Count(_Identify)", "进入渠道 = 6 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("调出") = DataTables("人员增减").Compute("Count(_Identify)", "退出渠道 = 1 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("退休") = DataTables("人员增减").Compute("Count(_Identify)", "退出渠道 = 2 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("辞职辞退") = DataTables("人员增减").Compute("Count(_Identify)", "退出渠道 = 3 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("开除") = DataTables("人员增减").Compute("Count(_Identify)", "退出渠道 = 4 And 单位代码 = " & e.DataRow("单位代码"))
e.DataRow("死亡") = DataTables("人员增减").Compute("Count(_Identify)", "退出渠道 = 5 And 单位代码 = " & e.DataRow("单位代码"))
End Select