Prepare edit事件
' 刀具编号 列禁止输入, "刀具名称","申购人","申购日期","备注","成本中心","数量","采购原因","项目名称","要求到货日期","产品名称",只允许 角色是"申购者"
编辑,但也只可当事人编辑自已的记录。
Select Case e.Col.name
Case "刀具编号"
e.Cancel = True
Case "刀具名称","申购人","申购日期","备注","成本中心","数量","采购原因","项目名称","要求到货日期","产品名称"
If User.IsRole("申购者")=False AndAlso e.Row("申购人") IsNot Nothing Then
e.Cancel = True
MessageBox.Show ("你有没有权限操作","提示")
Return
If e.Row("申购人") <> User.Name
e.Cancel = True
MessageBox.Show ("只有此条记录申请者可以修改","提示")
End If
End If
End Select