共用方式為


ObjectDataSourceView.Delete(IDictionary, IDictionary) 方法

定義

透過呼叫由 DeleteMethod 該屬性識別的業務物件方法,使用指定的 keysoldValues 集合來執行刪除操作。

public:
 int Delete(System::Collections::IDictionary ^ keys, System::Collections::IDictionary ^ oldValues);
public int Delete(System.Collections.IDictionary keys, System.Collections.IDictionary oldValues);
override this.Delete : System.Collections.IDictionary * System.Collections.IDictionary -> int
Public Function Delete (keys As IDictionary, oldValues As IDictionary) As Integer

參數

keys
IDictionary

IDictionary A是用來識別要刪除項目的關鍵值之一。 這些參數與 DeleteMethod 屬性一起使用來執行刪除操作。 若方法無參數,則傳遞 null

oldValues
IDictionary

IDictionary A 包含用於匹配資料來源項目的額外非鍵值。 只有當該 ConflictDetection 屬性被設定為 CompareAllValues 欄位時,列值才會傳遞給方法。

傳回

刪除的列數;否則,若未知數值,則為 -1。

備註

預設值為 -1,表示刪除了未知數量的列。 若要回傳不同值,請設定AffectedRows事件處理程序物件DeletedObjectDataSourceStatusEventArgs屬性。 受影響的列數通常由 Delete 該業務物件的方法回傳,該值可從 ReturnValue 事件處理程序參數的屬性 ObjectDataSourceStatusEventArgs 中取得 Deleted

該方法呼叫 DeleteExecuteDelete 方法,傳遞 keysoldValues 集合。

適用於

另請參閱