コード例 #1
0
ファイル: Reference.cs プロジェクト: vinhdoan/Angroup.demo
 /// <remarks/>
 public void UpdateItemAsync(UpdateItemType UpdateItem1, object userState) {
     if ((this.UpdateItemOperationCompleted == null)) {
         this.UpdateItemOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateItemOperationCompleted);
     }
     this.InvokeAsync("UpdateItem", new object[] {
                 UpdateItem1}, this.UpdateItemOperationCompleted, userState);
 }
コード例 #2
0
        /********************************************************************
          * MARK ITEM AS READ
          ********************************************************************/
        public static bool SetReadStatus(ItemIdType item)
        {
            SetItemFieldType setField = new SetItemFieldType();
            PathToUnindexedFieldType path = new PathToUnindexedFieldType();

            MessageType message = new MessageType();
            message.IsRead = true;
            message.IsReadSpecified = true;
            setField.Item1 = message;
            path.FieldURI = UnindexedFieldURIType.messageIsRead;

            setField.Item = path;
            ItemChangeType[] updatedItems = new ItemChangeType[1];
            updatedItems[0] = new ItemChangeType();
            updatedItems[0].Updates = new ItemChangeDescriptionType[1];
            updatedItems[0].Updates[0] = setField;

            ItemChangeDescriptionType[] updates = new ItemChangeDescriptionType[1];
            updates[0] = new ItemChangeDescriptionType();
            updates[0].Item = path;

            updatedItems[0].Item = new ItemIdType();
            ((ItemIdType)updatedItems[0].Item).Id = item.Id;
            ((ItemIdType)updatedItems[0].Item).ChangeKey = item.ChangeKey;
            UpdateItemType request = new UpdateItemType();
            request.ItemChanges = updatedItems;
            request.ConflictResolution = ConflictResolutionType.AutoResolve;
            request.MessageDisposition = MessageDispositionType.SaveOnly;
            request.MessageDispositionSpecified = true;

            UpdateItemResponseType response = service.UpdateItem(request);

            if (response.ResponseMessages.Items[0].ResponseClass !=
                                 ResponseClassType.Success)
                return false;
            else
                return true;
        }
コード例 #3
0
ファイル: Reference.cs プロジェクト: vinhdoan/Angroup.demo
 /// <remarks/>
 public void UpdateItemAsync(UpdateItemType UpdateItem1) {
     this.UpdateItemAsync(UpdateItem1, null);
 }