通过托管Api管理Exchange 2013中的资源预订策略

时间:2013-08-16 11:52:13

标签: c# exchange-server exchangewebservices ews-managed-api

我想管理房间的预订政策,例如会议的最长时间。有人知道你是如何通过Managed API做到的吗?

1 个答案:

答案 0 :(得分:0)

托管API无法监控最长持续时间,但您提交的内容是在提交预订之前验证条目...

                    public override bool IsNoOverTimeLimit(Reservation reservation)
                    {
                        return reservation.End.Subtract(reservation.Start).TotalMinutes <= 120;
                    }
                    if(!IsNoOverTimeLimit)
                    {
                        var errorMsg = new Label();
                        var fontSize = FontUnit.Point(10);
                        errorMsg.Font.Size = fontSize;
                        errorMsg.Text = "Reservation time is limited to " + ((float)30 / 60).ToString(CultureInfo.InvariantCulture) + " hours at a time.<br /> ";
                        placeHolder.Controls.Add(errorMsg);
                    }

我的版本比这更复杂,但你明白了。只需在提交之前检查预订,如果超过时间限制,请返回页面并发出一些警告..