SPAudit.Update method
使用AuditFlags屬性的變更更新的 SharePoint 資料庫
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Sub Update
'用途
Dim instance As SPAudit
instance.Update()
public void Update()
備註
以AuditFlags進行變更之後立即呼叫Update 。
Examples
下列範例示範如何變更稽核設定,為清單項目。( item是一個物件的型別SPListItem)。
// Turns on auditing of user views of the list item without changing
// any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags | SPAuditMaskType.View);
oListItem.Audit.Update();
// Turns off auditing of user views of the list item without changing
// any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags &
(SPAuditMaskType.All ^ SPAuditMaskType.View));
oListItem.Audit.Update();
// Turns on auditing of all types of events and actions relevant to
// the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.All;
oListItem.Audit.Update();
// Turns off all auditing of the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.None;
oListItem.Audit.Update();
' Turns on auditing of user views of the list item without changing
' any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags Or SPAuditMaskType.View)
oListItem.Audit.Update()
' Turns off auditing of user views of the list item without changing
' any existing auditing settings.
oListItem.Audit.AuditFlags = (oListItem.Audit.AuditFlags And (SPAuditMaskType.All Xor SPAuditMaskType.View))
oListItem.Audit.Update()
' Turns on auditing of all types of events and actions relevant to
' the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.All
oListItem.Audit.Update()
' Turns off all auditing of the list item.
oListItem.Audit.AuditFlags = SPAuditMaskType.None
oListItem.Audit.Update()
請參閱
參照
Microsoft.SharePoint namespace