For Each c As WinForm.Control In e.Form.Controls If Typeof c Is WinForm.Button Then Select Case c.name Case "选择出库", "删除出库明细" If User.Name = "入库员" Then c.Visible = False End If Case Else c.Visible = True End Select End IfNext