Beispiel #1
0
		/// <remarks/>
		public void CreateItemAsync(CreateItemType CreateItem1, object userState)
		{
			if ((CreateItemOperationCompleted == null))
			{
				CreateItemOperationCompleted = new SendOrPostCallback(OnCreateItemOperationCompleted);
			}
			InvokeAsync("CreateItem", new object[]
			                          	{
			                          		CreateItem1
			                          	}, CreateItemOperationCompleted, userState);
		}
Beispiel #2
0
		/// <remarks/>
		public IAsyncResult BeginCreateItem(CreateItemType CreateItem1, AsyncCallback callback, object asyncState)
		{
			return BeginInvoke("CreateItem", new object[]
			                                 	{
			                                 		CreateItem1
			                                 	}, callback, asyncState);
		}
Beispiel #3
0
		/// <remarks/>
		public void CreateItemAsync(CreateItemType CreateItem1)
		{
			CreateItemAsync(CreateItem1, null);
		}
		/// <summary>
		/// Inserts the specified appointment.
		/// </summary>
		/// <param name="owner">The owner RadScheduler instance.</param>
		/// <param name="appointmentToInsert">The appointment to insert.</param>
		public override void Insert(RadScheduler owner, Appointment appointmentToInsert)
		{
			CreateRecurrenceExceptionContext createExceptionContext = owner.ProviderContext as CreateRecurrenceExceptionContext;
			if (createExceptionContext != null)
			{
				Debug.Assert(appointmentToInsert.RecurrenceState == RecurrenceState.Exception);
				InsertRecurrenceException(owner, appointmentToInsert, createExceptionContext.RecurrenceExceptionDate);
				return;
			}

          
			CalendarItemType calendarItem = CreateCalendarItem(owner, appointmentToInsert);
     
			CreateItemType createItemRequest = new CreateItemType();

            DistinguishedFolderIdType destFolder = new DistinguishedFolderIdType();
            destFolder.Id = DistinguishedFolderIdNameType.calendar;

            EmailAddressType emailAddressType = new EmailAddressType();
            emailAddressType.EmailAddress = this.CalendarNames;

            destFolder.Mailbox = emailAddressType;

            createItemRequest.SavedItemFolderId = new TargetFolderIdType();
            createItemRequest.SavedItemFolderId.Item = destFolder;

            
			createItemRequest.SendMeetingInvitations = CalendarItemCreateOrDeleteOperationType.SendToNone;
			createItemRequest.SendMeetingInvitationsSpecified = true;
			createItemRequest.Items = new NonEmptyArrayOfAllItemsType();
			createItemRequest.Items.Items = new CalendarItemType[] { calendarItem };
           
			CreateItemResponseType response = Service.CreateItem(createItemRequest);
			ResponseMessageType responseMessage = response.ResponseMessages.Items[0];

			if (responseMessage.ResponseCode != ResponseCodeType.NoError)
			{
				throw new Exception("CreateItem failed with response code " + responseMessage.ResponseCode);
			}
		}