示例#1
0
        // Token: 0x060004BA RID: 1210 RVA: 0x00027480 File Offset: 0x00025680
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            string action = this.Action;

            if (Utilities.IsPostRequest(base.Request) && string.Equals(action, "Delete", StringComparison.Ordinal))
            {
                this.isBeingCanceled = true;
            }
            CalendarItemBase calendarItemBase = base.OwaContext.PreFormActionData as CalendarItemBase;

            this.folderId = EditCalendarItemHelper.GetCalendarFolderId(base.Request, base.UserContext);
            if (calendarItemBase != null)
            {
                this.CalendarItemBase             = calendarItemBase;
                base.OwaContext.PreFormActionData = null;
            }
            else
            {
                this.LoadCalendarItem(this.folderId);
                bool flag = string.Equals(action, "New", StringComparison.Ordinal) && string.IsNullOrEmpty(Utilities.GetQueryStringParameter(base.Request, "id", false));
                if (flag)
                {
                    bool isMeeting = Utilities.GetQueryStringParameter(base.Request, "mr", false) != null;
                    this.CalendarItemBase.IsMeeting = isMeeting;
                }
            }
            if (Utilities.GetQueryStringParameter(base.Request, "sndpt", false) != null)
            {
                CalendarItemUtilities.BuildSendConfirmDialogPrompt(this.calendarItemBase, out this.sendIssuesPrompt);
            }
            if (!this.IsUnsaved && !this.isBeingCanceled)
            {
                CalendarUtilities.AddCalendarInfobarMessages(base.Infobar, this.CalendarItemBase, null, base.UserContext);
            }
            if (!this.IsUnsaved && this.IsOccurrence && !this.isBeingCanceled && this.CalendarItemBase.IsOrganizer())
            {
                SanitizedHtmlString messageHtml = SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(538626087), new object[]
                {
                    "<a href=\"#\" onClick=\"return onClkES()\">",
                    "</a>"
                });
                base.Infobar.AddMessageHtml(messageHtml, InfobarMessageType.Informational);
            }
            this.recipientWell = new CalendarItemRecipientWell(base.UserContext, this.CalendarItemBase);
            this.toolbar       = new EditCalendarItemToolbar(this.IsUnsaved, this.IsMeeting, this.CalendarItemBase.MeetingRequestWasSent, this.CalendarItemBase.Importance, this.CalendarItemBase.CalendarItemType, base.Response.Output, true, this.isBeingCanceled);
            base.CreateAttachmentHelpers(AttachmentWellType.ReadWrite);
            CalendarModuleViewState calendarModuleViewState = base.UserContext.LastClientViewState as CalendarModuleViewState;

            if (calendarModuleViewState != null)
            {
                this.lastAccessedYear = calendarModuleViewState.DateTime.Year;
            }
        }
示例#2
0
        internal static InfobarMessage BuildCancellationPrompt(CalendarItemBase calendarItemBase, UserContext userContext)
        {
            bool flag  = calendarItemBase.CalendarItemType != CalendarItemType.Single;
            bool flag2 = calendarItemBase.IsMeeting && calendarItemBase.MeetingRequestWasSent;

            if (!flag && !flag2)
            {
                throw new ArgumentException("The input calendarItemBase doesn't need a cancellation prompt.");
            }
            SanitizedHtmlString bodyHtml = null;
            SanitizedHtmlString messageHtml;

            if (flag)
            {
                if (calendarItemBase.IsMeeting)
                {
                    messageHtml = SanitizedHtmlString.FromStringId(-2063563644);
                }
                else
                {
                    messageHtml = SanitizedHtmlString.FromStringId(78467316);
                }
                CalendarModuleViewState calendarModuleViewState = userContext.LastClientViewState as CalendarModuleViewState;
                ExDateTime cancelFromDate;
                if (calendarModuleViewState != null)
                {
                    cancelFromDate = calendarModuleViewState.DateTime;
                }
                else
                {
                    cancelFromDate = DateTimeUtilities.GetLocalTime();
                }
                bodyHtml = EditCalendarItemHelper.BuildCancelRecurringTable(calendarItemBase.CalendarItemType, cancelFromDate);
            }
            else
            {
                messageHtml = SanitizedHtmlString.FromStringId(-240976491);
            }
            SanitizedHtmlString footerHtml;

            if (!calendarItemBase.IsMeeting)
            {
                footerHtml = SanitizedHtmlString.FromStringId(2058056132);
            }
            else if (!calendarItemBase.MeetingRequestWasSent)
            {
                footerHtml = SanitizedHtmlString.FromStringId(2133761911);
            }
            else
            {
                footerHtml = SanitizedHtmlString.FromStringId(-1210628592);
            }
            return(InfobarMessage.CreatePromptHtml(messageHtml, bodyHtml, footerHtml));
        }
示例#3
0
        // Token: 0x06000561 RID: 1377 RVA: 0x0002AA2C File Offset: 0x00028C2C
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            CalendarItemData calendarItemData = base.OwaContext.PreFormActionData as CalendarItemData;

            if (calendarItemData != null)
            {
                this.calendarItemData = new CalendarItemData(calendarItemData);
                if (this.calendarItemData.Recurrence == null)
                {
                    this.calendarItemData.Recurrence = CalendarUtilities.CreateDefaultRecurrence(this.calendarItemData.StartTime);
                }
                if (this.calendarItemData.FolderId != null)
                {
                    this.folderId = this.calendarItemData.FolderId.ToBase64String();
                }
                if (this.calendarItemData.Id != null)
                {
                    this.calendarItemId = this.calendarItemData.Id.ToBase64String();
                }
                if (!string.IsNullOrEmpty(Utilities.GetQueryStringParameter(base.Request, "d", false)))
                {
                    this.isDirty = true;
                }
                if (!string.IsNullOrEmpty(Utilities.GetQueryStringParameter(base.Request, "cd", false)))
                {
                    this.isCalendarItemDirty = true;
                }
                if (!string.IsNullOrEmpty(Utilities.GetQueryStringParameter(base.Request, "pcp", false)))
                {
                    this.doConfirmPatternChange = true;
                }
                this.toolbar        = new Toolbar(base.Response.Output, true);
                this.recurrenceType = CalendarUtilities.MapRecurrenceType(this.calendarItemData.Recurrence);
                CalendarModuleViewState calendarModuleViewState = base.UserContext.LastClientViewState as CalendarModuleViewState;
                if (calendarModuleViewState != null)
                {
                    this.lastAccessedYear = calendarModuleViewState.DateTime.Year;
                }
                return;
            }
            throw new ArgumentException("No calendar item data passed in context, or wrong type.");
        }
示例#4
0
        public static StoreObjectId GetCalendarFolderId(HttpRequest request, UserContext userContext)
        {
            StoreObjectId storeObjectId        = null;
            string        queryStringParameter = Utilities.GetQueryStringParameter(request, "fId", false);

            if (!string.IsNullOrEmpty(queryStringParameter))
            {
                storeObjectId = Utilities.CreateStoreObjectId(userContext.MailboxSession, queryStringParameter);
            }
            else
            {
                CalendarModuleViewState calendarModuleViewState = userContext.LastClientViewState as CalendarModuleViewState;
                if (calendarModuleViewState != null)
                {
                    storeObjectId = calendarModuleViewState.FolderId;
                }
            }
            if (storeObjectId == null)
            {
                storeObjectId = userContext.CalendarFolderId;
            }
            return(storeObjectId);
        }