It is said that splistitem. Delete cannot be deleted. Even if you do not know how to delete it, you can see the implementation of the system.Code, You need your own friends:
(This code is in the Microsoft. Sharepoint. webcontrols. deleteitembutton class)
Private void Deletefromrecurrenceseries () {If (base. itemcontext. List. basetemplate = splisttemplatetype. Events) | (base. itemcontext. contenttype! = NULL) & base. itemcontext. contenttype. Id. ischildof (spbuiltincontenttypeid. Event) {While (true) {using (ienumerator Enumerator = Base. itemcontext. formcontext. fieldcontrolcollection. getenumerator () {control Control ; Recurrencefield Field ; Goto label_0023; Label_001b : Field. deleteexceptionitem (); return; Label_0023 : If (enumerator. movenext () {goto label_0036;} return; Label_002e : Field. deleteinstanceitem (); return; Label_0036 : Control = (Control) enumerator. Current; If (control is recurrencefield) {goto label_005c;} goto label_0023; Label_004d : If (! Base. listitem. isexceptionid) {return;} goto label_001b; Label_005c : Field = (recurrencefield) control; If (! Base. listitem. isinstanceid) {goto label_004d;} goto label_002e ;}}}} |