If User.Group = "单独执行" Then
DataTables("项目基础表").LoadFilter = "公司标记 in ('" & User.Roles.replace(",", "','") & "')"
DataTables("收入明细录入台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("成本明细录入台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("财务收支台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("fa piao台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("员工档案").LoadFilter = "公司标记 in ('" & User.Roles.replace(",", "','") & "')"
DataTables("公司档案").LoadFilter = "公司标记 in ('" & User.Roles.replace(",", "','") & "')"
DataTables("资产管理主表").LoadFilter = "[_Identify] Is Null" '不加载任何数据
DataTables("电台广告排期录入表").LoadFilter = ""
ElseIf User.Group = "单独业务" Then
DataTables("项目基础表").LoadFilter = "公司标记 in ('" & User.Roles.replace(",", "','") & "')"
DataTables("收入明细录入台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("成本明细录入台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("财务收支台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("fa piao台账").LoadFilter = "',' + 执行人姓名 + ',' like '%," & user.Name & ",%'"
DataTables("员工档案").LoadFilter = "公司标记 in ('" & User.Roles.replace(",", "','") & "')"
DataTables("公司档案").LoadFilter = "公司标记 in ('" & User.Roles.replace(",", "','") & "')"
DataTables("资产管理主表").LoadFilter = "[_Identify] Is Null" '不加载任何数据
DataTables("电台广告排期录入表").LoadFilter = ""
Else
Dim filter As String = "1=2"
For Each s As String In user.roles.split(",")
filter &= " or ',' + 公司标记 + ',' like '%," & s & ",%'"
Next
DataTables("项目基础表").LoadFilter = filter
DataTables("收入明细录入台账").LoadFilter = filter
DataTables("成本明细录入台账").LoadFilter = filter
DataTables("财务收支台账").LoadFilter = filter
DataTables("fa piao台账").LoadFilter = filter
DataTables("员工档案").LoadFilter = filter
DataTables("公司档案").LoadFilter = filter
DataTables("资产管理主表").LoadFilter = filter
DataTables("电台广告排期录入表").LoadFilter = ""
End If
DataTables("项目基础表").Load()
DataTables("收入明细录入台账").Load()
DataTables("成本明细录入台账").Load()
DataTables("财务收支台账").Load()
DataTables("fa piao台账").Load()
DataTables("员工档案").Load()
DataTables("公司档案").Load()
DataTables("资产管理主表").Load()
DataTables("电台广告排期录入表").Load()
StatusBar.Message3 = Date.Today & " " & User.Name
vars("YHM") = user.name '将登陆用户名赋值给YHM,报表或其他位置中有引用