Exchange server 预约所有房间

Exchange server 预约所有房间,exchange-server,exchangewebservices,Exchange Server,Exchangewebservices,目前,我可以获得一个房间的所有预约,但我有很多房间,如果我想显示所有预约,性能非常差,因此我想问是否有方法一次获得多个房间的所有预约?没有操作可以这样做。但是,您可以使用GetUserAvailability操作,如果您请求CalendarDetails,则该操作将为您提供FreeBusy状态和Calendar属性Start、End、Location、Subject的子集,请参见。此操作有一些限制,通常时间窗口为42天,每个请求最多只能检索100个邮箱 干杯 格伦 //初始化开始和结束时间的值,

目前,我可以获得一个房间的所有预约,但我有很多房间,如果我想显示所有预约,性能非常差,因此我想问是否有方法一次获得多个房间的所有预约?

没有操作可以这样做。但是,您可以使用GetUserAvailability操作,如果您请求CalendarDetails,则该操作将为您提供FreeBusy状态和Calendar属性Start、End、Location、Subject的子集,请参见。此操作有一些限制,通常时间窗口为42天,每个请求最多只能检索100个邮箱

干杯 格伦

//初始化开始和结束时间的值,以及要检索的约会数。
DateTime startDate=DateTime.Now;
DateTime endDate=开始日期。添加日期(30);
常量int NUM_APPTS=5;
//仅使用文件夹ID初始化日历文件夹对象。
CalendarFolder calendar=CalendarFolder.Bind(服务,WellKnownFolderName.calendar,新属性集());
//设置要检索的开始和结束时间以及约会数。
CalendarView cView=新的CalendarView(开始日期、结束日期、数值应用);
//限制返回到约会主题、开始时间和结束时间的属性。
cView.PropertySet=newpropertyset(appointschema.Subject,appointschema.Start,appointschema.End);
//使用日历视图检索约会集合。
FindItemsResults约会=calendar.FindAppoints(cView);
Console.WriteLine(“\n日历上的第一个”+NUM_APPTS+”约会从“+startDate.Date.ToShortDateString()+
“到”+endDate.Date.ToShortDateString()+“是:\n”);
foreach(预约中的预约)
{
Console.Write(“Subject:+a.Subject.ToString()+”);
编写(“Start:+a.Start.ToString()+”);
Console.Write(“End:+a.End.ToString());
Console.WriteLine();
}
// Initialize values for the start and end times, and the number of appointments to retrieve.
        DateTime startDate = DateTime.Now;
        DateTime endDate = startDate.AddDays(30);
        const int NUM_APPTS = 5;

        // Initialize the calendar folder object with only the folder ID. 
        CalendarFolder calendar = CalendarFolder.Bind(service, WellKnownFolderName.Calendar, new PropertySet());

        // Set the start and end time and number of appointments to retrieve.
        CalendarView cView = new CalendarView(startDate, endDate, NUM_APPTS);

        // Limit the properties returned to the appointment's subject, start time, and end time.
        cView.PropertySet = new PropertySet(AppointmentSchema.Subject, AppointmentSchema.Start, AppointmentSchema.End);

        // Retrieve a collection of appointments by using the calendar view.
        FindItemsResults<Appointment> appointments = calendar.FindAppointments(cView);

        Console.WriteLine("\nThe first " + NUM_APPTS + " appointments on your calendar from " + startDate.Date.ToShortDateString() + 
                          " to " + endDate.Date.ToShortDateString() + " are: \n");

        foreach (Appointment a in appointments)
        {
            Console.Write("Subject: " + a.Subject.ToString() + " ");
            Console.Write("Start: " + a.Start.ToString() + " ");
            Console.Write("End: " + a.End.ToString());
            Console.WriteLine();
        }