Select Case e.link.text
Case "入库管理1"
MainTable = Tables("入库表")
DataTables("入库表").loadfilter = ""
DataTables("入库表").load()
Forms("入库表").show
Case "库存管理1"
MainTable = Tables("库存表")
DataTables("库存表").loadfilter = ""
DataTables("库存表").load
Forms("库存表").show
Case "出库管理1"
MainTable = Tables("出库表")
DataTables("出库表").loadfilter = ""
DataTables("出库表").load
Forms("出库表").show
Case "增加入库操作"
If user.group = "成品仓库" OrElse user.Type = usertypeenum.developer Then
MainTable = Tables("入库表")
DataTables("入库表").loadfilter = ""
DataTables("入库表").load()
Forms("增加入库操作").open()
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "库存操作"
If user.group = "成品仓库" OrElse user.Type = usertypeenum.developer Then
Forms("库存表回收").close
MainTable = Tables("库存表")
DataTables("库存表").load
Forms("库存操作").open
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "仓位图"
Forms("仓位图").show
MainTable = Tables("仓位图")
Case "库存表回收"
If user.group = "成品仓库" OrElse user.Type = usertypeenum.developer Then
MainTable = Tables("库存表")
Forms("库存表回收").open
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "查看回收站"
MainTable = Tables("库存表回收站")
Forms("回收站").open
DataTables("库存表回收站").load
Case "出库表物流操作"
If user.group = "成品仓库" OrElse user.Type = usertypeenum.developer Then
MainTable = Tables("出库表")
Forms("出库表物流操作").open
DataTables("出库表").load
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "日志查看"
If user.group = "财务" OrElse user.Type = usertypeenum.developer Then
MainTable = Tables("数据操作日志")
Forms("日志查看").open
DataTables("数据操作日志").load
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "财务统计1"
If user.group = "财务" OrElse user.Type = usertypeenum.developer OrElse user.roles = "副总经理" OrElse user.roles = "总经理" OrElse user.Type = UserTypeEnum.Administrator Then
MainTable = Tables("main")
Forms("统计窗口").open
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "财务统计2"
If user.group = "财务" OrElse user.Type = usertypeenum.developer OrElse user.roles = "副总经理" OrElse user.roles = "总经理" OrElse user.Type = UserTypeEnum.Administrator Then
MainTable = Tables("main")
Forms("统计窗口2").open
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "财务统计3"
If user.Type = UserTypeEnum.Developer OrElse user.Type = UserTypeEnum.Administrator OrElse user.roles = "总经理" Then
MainTable = Tables("库存表")
DataTables("库存表").loadfilter = ""
DataTables("库存表").load
Forms("统计窗口3").open
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
Case "系统设置"
If user.Type = UserTypeEnum.Developer OrElse user.Type = UserTypeEnum.Administrator Then
MainTable = Tables("系统设置表")
Forms("系统设置").open
Else
messagebox.show("您没有此操作权限","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
End Select