日历时间表请求发送给用户是否被接受?

时间:2015-06-11 13:53:45

标签: c# exchange-server

我正在安排交换服务器中的资源。我可以使用下面的c#代码获取用户空闲/忙碌状态

GetUserAvailabilityResults results = serviceData.GetUserAvailability(attendees,
    availabilityOptions.DetailedSuggestionsWindow,
    AvailabilityData.FreeBusyAndSuggestions,
    availabilityOptions);

还能够将调度请求发送给用户

ExchangeService serviceData = (ExchangeService)Session["serviceData"];
Appointment appointment = new Appointment(serviceData);
appointment.Subject = model.Title;
appointment.Body = model.Description;
appointment.Start = model.Start;
appointment.End = model.End;
appointment.RequiredAttendees.Add(model.OwnerID);

appointment.Save(SendInvitationsMode.SendToAllAndSaveCopy);

现在是否可以检查发送给用户的计划请求是否被接受?

1 个答案:

答案 0 :(得分:0)

如果您想检查会议的接受状态,您只需要在约会所有者日历中迭代约会对象的与会者集合,例如

            foreach(Attendee attendee in aptobj.RequiredAttendees){
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }

        }
        foreach (Attendee attendee in aptobj.OptionalAttendees)
        {
            if (attendee.ResponseType.HasValue)
            {
                Console.WriteLine(attendee.Address + " " + attendee.ResponseType.Value);
            }
        }

干杯 格伦