如何使用.NET 2.0和C#插入日历约会项目的唯一APPOINTMENT ID? [英] How to get UNIQUE APPOINTMENT ID of calender appointment item, at the time of it's insertion using .NET 2.0 and C#?

查看:71
本文介绍了如何使用.NET 2.0和C#插入日历约会项目的唯一APPOINTMENT ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Exchange Web Services 2007 SP1插入日历时,是否可以帮助我找出日历约会项目的唯一任命ID?我使用的是.NET 2.0和C#。代码如下:


             ExchangeServiceBinding esb = new ExchangeServiceBinding();

            esb.RequestServerVersionValue = new RequestServerVersion();

            esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;

            esb.Credentials = new NetworkCredential(userName,password,domain);

            esb.Url = @" https://" + fullQualifiedDomainName +" /EWS/Exchange.asmx" ;;

            

            / *一些代码用于创建[CalendarItemType]并设置不同的属性... * /
$
           

            //创建约会...

            CreateItemResponseType response = esb.CreateItem(request);


            //获取回复消息。

            ResponseMessageType [] rmta = response.ResponseMessages.Items;


            / *根据响应消息状态,我检查,是否成功添加约会? * /


           在这里,我如何获得此预约的唯一任命ID和更改密钥ID?
$
           注意:我在以后的申请阶段使用这个独特的任命ID修改/删除/取消预约。

            ;如果有更好的方式来插入/修改/删除/取消约会,那么请指出。


          ;  谢谢,

            Bharat Mori ...........快乐编程......! :)




$

解决方案

你好Bharat.Mori,


主题
创建约会(Exchange Web服务)
可以满足您的需求。但是,在使用Exchange Web服务时,有更好的方法与Exchange Server进行交互。查看EWS托管API。与您使用wsdl.exe或Visual Studio(添加Web引用)的
自动生成的对象模型不同,EWS Managed  API是一种有意的,因此更直观的对象模型。您会发现使用此API设计解决方案要容易得多。


Exchange Web Services托管API 1.1  (下载)

Microsoft Exchange Web服务托管API 1.1
(文档)


关于,



Can anyone help me to find out UNIQUE APPOINTMENT ID of calender appointment item, at the time of it's insertion using Exchange Web Services 2007 SP1? I am using .NET 2.0 and C#. The code is as under:

            ExchangeServiceBinding esb = new ExchangeServiceBinding();
            esb.RequestServerVersionValue = new RequestServerVersion();
            esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
            esb.Credentials = new NetworkCredential(userName, password, domain);
            esb.Url = @"https://" + fullyQualifiedDomainName + "/EWS/Exchange.asmx";
            
            /* Some code to create [CalendarItemType] and setting different properties... */
           
            // Create appointment...
            CreateItemResponseType response = esb.CreateItem(request);

            // Get the response messsages.
            ResponseMessageType[] rmta = response.ResponseMessages.Items;

            /* Based on response message status, I check, whether appointment added successfully or not? */

            Here, how can I get UNIQUE APPOINTMENT ID and CHANGE KEY ID of this appointment ???
            Note : I am using this UNIQUE APPOINTMENT ID to Modify/Delete/Cancel appointment on later application stages.
            If there is any better way to Insert/Modify/Delete/Cancel an appointment then please, kindly specify.

            Thanks,
            Bharat Mori...........Happy Programming....! :)

解决方案

Hello Bharat.Mori,

The topic Creating Appointments (Exchange Web Services) does what you need. But, there is a MUCH better way to interface with Exchange Server when using the Exchange Web Services. Check out the EWS Managed API. Unlike the autogenerated object model that you are using from wsdl.exe or Visual Studio (Added Web Reference), the EWS Managed API is an intentional and therefore much more intuitive object model. You will find it much easier to engineer solutions with this API.

Exchange Web Services Managed API 1.1 (download)
Microsoft Exchange Web Services Managed API 1.1 (documentation)

With regards,


这篇关于如何使用.NET 2.0和C#插入日历约会项目的唯一APPOINTMENT ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆