コード例 #1
0
        public PrintEventListVisual(ISessionContext sessionContext, int index, ICalendarDataSource dataSource, bool isFirst) : base(sessionContext, index, dataSource, isFirst)
        {
            if (base.SessionContext is UserContext)
            {
                this.invitees = dataSource.GetInviteesDisplayNames(index);
                OwaStoreObjectId itemId = dataSource.GetItemId(index);
                if (itemId == null)
                {
                    return;
                }
                using (Item item = Utilities.GetItem <Item>((UserContext)base.SessionContext, itemId, new PropertyDefinition[0]))
                {
                    using (TextReader textReader = item.Body.OpenTextReader(BodyFormat.TextPlain))
                    {
                        this.notes = textReader.ReadToEnd();
                    }
                    return;
                }
            }
            PublishedCalendarDataSource publishedCalendarDataSource = (PublishedCalendarDataSource)dataSource;

            if (publishedCalendarDataSource.DetailLevel == DetailLevelEnumType.FullDetails)
            {
                PublishedCalendarItemData?item2 = publishedCalendarDataSource.GetItem(index);
                if (item2 != null)
                {
                    this.notes = item2.Value.BodyText;
                }
            }
        }
コード例 #2
0
        // Token: 0x06002D62 RID: 11618 RVA: 0x000FEC88 File Offset: 0x000FCE88
        protected T GetRequestItem <T>(params PropertyDefinition[] prefetchProperties) where T : Item
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");
            string           changeKey        = (string)base.GetParameter("CK");

            return(Utilities.GetItem <T>(base.UserContext, owaStoreObjectId, changeKey, prefetchProperties));
        }
コード例 #3
0
        public void Save()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ReadPostEventHandler.Savepost");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");
            string           changeKey        = (string)base.GetParameter("CK");

            using (PostItem item = Utilities.GetItem <PostItem>(base.UserContext, owaStoreObjectId, changeKey, false, new PropertyDefinition[0]))
            {
                ExTraceGlobals.MailTracer.TraceDebug((long)this.GetHashCode(), "Saving post. ");
                object parameter = base.GetParameter("Subj");
                if (parameter != null)
                {
                    try
                    {
                        item.Subject = (string)parameter;
                    }
                    catch (PropertyValidationException ex)
                    {
                        throw new OwaInvalidRequestException(ex.Message);
                    }
                }
                Utilities.SaveItem(item, true);
                item.Load();
                this.Writer.Write("<div id=ck>");
                this.Writer.Write(item.Id.ChangeKeyAsBase64String());
                this.Writer.Write("</div>");
            }
        }
コード例 #4
0
 protected void InternalSort()
 {
     try
     {
         ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "VirtualListViewEventHandler.InternalSort");
         int rowCount = this.GetRowCount();
         this.PersistSort();
         VirtualListView2 listView = this.GetListView();
         listView.UnSubscribeForFolderContentChanges();
         if (base.IsParameterSet("SId"))
         {
             OwaStoreObjectId seekId = this.GetSeekId();
             listView.LoadData(seekId, SeekDirection.Next, rowCount);
         }
         else
         {
             listView.LoadData(0, rowCount);
         }
         listView.RenderData(this.Writer);
         listView.RenderChunk(this.Writer);
         this.RenderExtraData(listView);
         listView.RenderHeaders(this.Writer);
         this.RenderNewSelection(listView);
     }
     finally
     {
         this.EndProcessEvent();
     }
 }
コード例 #5
0
        protected override void OnLoad(EventArgs e)
        {
            string queryStringParameter = Utilities.GetQueryStringParameter(base.Request, "exdltdrft", false);

            if (!string.IsNullOrEmpty(queryStringParameter))
            {
                this.DeleteExistingDraft = true;
            }
            string queryStringParameter2 = Utilities.GetQueryStringParameter(base.Request, "fId", false);

            if (queryStringParameter2 != null)
            {
                this.targetFolderId = OwaStoreObjectId.CreateFromString(queryStringParameter2);
            }
            if (base.Item == null)
            {
                string queryStringParameter3 = Utilities.GetQueryStringParameter(base.Request, "email", false);
                if (!string.IsNullOrEmpty(queryStringParameter3))
                {
                    StoreObjectId mailboxItemStoreObjectId = null;
                    if (MailToParser.TryParseMailTo(queryStringParameter3, base.UserContext, out mailboxItemStoreObjectId))
                    {
                        base.OwaContext.PreFormActionId = OwaStoreObjectId.CreateFromMailboxItemId(mailboxItemStoreObjectId);
                        this.DeleteExistingDraft        = true;
                    }
                }
            }
            string queryStringParameter4 = Utilities.GetQueryStringParameter(base.Request, "fRABcc", false);

            this.isReplyAllBcc = (0 == string.CompareOrdinal("1", queryStringParameter4));
        }
コード例 #6
0
        public void RefreshWell()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "AttachmentEventHandler.RefreshWell");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");

            this.RenderAttachments(owaStoreObjectId);
        }
コード例 #7
0
        public void CleanupUnlinkedAttachments()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "AttachmentEventHandler.CleanupUnlinkedAttachments");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");
            string           changeKey        = (string)base.GetParameter("CK");
            string           bodyMarkup       = (string)base.GetParameter("BodyMarkup");

            using (Item item = Utilities.GetItem <Item>(base.UserContext, owaStoreObjectId, changeKey, new PropertyDefinition[0]))
            {
                if (base.UserContext.IsIrmEnabled)
                {
                    Utilities.IrmDecryptIfRestricted(item, base.UserContext, true);
                }
                item.OpenAsReadWrite();
                AttachmentUtility.RemoveUnlinkedInlineAttachments(item, bodyMarkup);
                ConflictResolutionResult conflictResolutionResult = item.Save(SaveMode.ResolveConflicts);
                if (conflictResolutionResult.SaveStatus == SaveResult.IrresolvableConflict)
                {
                    throw new OwaEventHandlerException("Could not save item due to conflict resolution failure", LocalizedStrings.GetNonEncoded(-482397486), OwaEventHandlerErrorCode.ConflictResolution);
                }
                item.Load();
                this.RenderTotalAttachmentSize(item);
                base.WriteChangeKey(item);
            }
        }
コード例 #8
0
        private void RenderAttachments(OwaStoreObjectId owaStoreObjectId)
        {
            Item item = null;

            try
            {
                item = Utilities.GetItem <Item>(base.UserContext, owaStoreObjectId, new PropertyDefinition[0]);
                if (base.UserContext.IsIrmEnabled)
                {
                    Utilities.IrmDecryptIfRestricted(item, base.UserContext, true);
                }
                this.Writer.Write("<div id=attWD>");
                ArrayList attachmentInformation = AttachmentWell.GetAttachmentInformation(item, null, base.UserContext.IsPublicLogon);
                AttachmentWell.RenderAttachments(this.Writer, AttachmentWellType.ReadWrite, attachmentInformation, base.UserContext);
                this.Writer.Write("</div>");
                this.Writer.Write("<div id=iBData>");
                AttachmentWell.RenderInfobar(this.Writer, attachmentInformation, base.UserContext);
                this.Writer.Write("</div>");
                base.WriteChangeKey(item);
            }
            finally
            {
                if (item != null)
                {
                    item.Dispose();
                    item = null;
                }
            }
        }
コード例 #9
0
        public void RenderImage()
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "Attachments.RenderImage");
            OwaStoreObjectId storeId = null;
            string           attId   = string.Empty;
            string           email   = string.Empty;

            if (base.IsParameterSet("Id"))
            {
                storeId = (OwaStoreObjectId)base.GetParameter("Id");
            }
            if (base.IsParameterSet("AttId"))
            {
                attId = (string)base.GetParameter("AttId");
            }
            if (base.IsParameterSet("em"))
            {
                email = (string)base.GetParameter("em");
            }
            string empty = string.Empty;

            using (Stream contactPictureStream = this.GetContactPictureStream(storeId, attId, email, out empty))
            {
                this.OutputImage(contactPictureStream, empty);
            }
            Utilities.MakePageCacheable(this.HttpContext.Response, new int?(3));
        }
コード例 #10
0
        public void ChangeEndRecurrence()
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");
            string           changeKey        = (string)base.GetParameter("CK");
            ExDateTime       endRange         = (ExDateTime)base.GetParameter("ET");
            CalendarItem     calendarItem     = null;

            try
            {
                calendarItem = Utilities.GetItem <CalendarItem>(base.UserContext, owaStoreObjectId, changeKey, new PropertyDefinition[]
                {
                    CalendarItemBaseSchema.IsMeeting,
                    CalendarItemBaseSchema.MeetingRequestWasSent,
                    StoreObjectSchema.EffectiveRights
                });
                if (!ItemUtility.UserCanEditItem(calendarItem) || Utilities.IsItemInExternalSharedInFolder(base.UserContext, calendarItem))
                {
                    this.Writer.Write("<div id=divOp _sOp=\"np\"></div>");
                }
                else
                {
                    int num = MeetingUtilities.CancelRecurrence(calendarItem, endRange);
                    if (num != -2147483648)
                    {
                        if (calendarItem.IsMeeting && calendarItem.MeetingRequestWasSent && calendarItem.IsOrganizer())
                        {
                            base.ResponseContentType = OwaEventContentType.Html;
                            this.Writer.Write("<div id=divOp _sOp=er></div>");
                        }
                        else if (0 < num)
                        {
                            EndDateRecurrenceRange range = new EndDateRecurrenceRange(calendarItem.Recurrence.Range.StartDate, endRange.IncrementDays(-1));
                            calendarItem.Recurrence = new Recurrence(calendarItem.Recurrence.Pattern, range);
                            Utilities.SaveItem(calendarItem);
                            this.RenderPayload(new OwaStoreObjectId[]
                            {
                                (OwaStoreObjectId)base.GetParameter("fId")
                            });
                        }
                        else
                        {
                            calendarItem.DeleteMeeting(DeleteItemFlags.MoveToDeletedItems);
                            this.RenderPayload(new OwaStoreObjectId[]
                            {
                                (OwaStoreObjectId)base.GetParameter("fId")
                            });
                        }
                    }
                }
            }
            finally
            {
                if (calendarItem != null)
                {
                    calendarItem.Dispose();
                    calendarItem = null;
                }
            }
        }
        // Token: 0x06002E9B RID: 11931 RVA: 0x0010A4EC File Offset: 0x001086EC
        private void DeleteConversationsOrItems(bool isPermanent)
        {
            DeleteItemInfo[]   array  = (DeleteItemInfo[])base.GetParameter("Itms");
            OwaStoreObjectId[] array2 = (OwaStoreObjectId[])base.GetParameter("Cnvs");
            if (array != null && array.Length > 0)
            {
                foreach (DeleteItemInfo deleteItemInfo in array)
                {
                    if (!deleteItemInfo.OwaStoreObjectId.IsOtherMailbox && !deleteItemInfo.OwaStoreObjectId.IsPublic && deleteItemInfo.OwaStoreObjectId.IsConversationId)
                    {
                        return;
                    }
                }
                base.InternalDelete(isPermanent, null);
                return;
            }
            if (array2 != null && array2.Length > 0)
            {
                OwaStoreObjectId   owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("fId");
                OwaStoreObjectId[] localItemIds     = ConversationUtilities.GetLocalItemIds(base.UserContext, array2, owaStoreObjectId);
                if (localItemIds.Length == 0)
                {
                    return;
                }
                new List <OwaStoreObjectId>();
                new List <OwaStoreObjectId>();
                if (!Utilities.IsDefaultFolderId(base.UserContext, owaStoreObjectId, DefaultFolderType.DeletedItems) && !isPermanent)
                {
                    OwaStoreObjectId[] array4 = localItemIds;
                    int j = 0;
                    while (j < array4.Length)
                    {
                        OwaStoreObjectId owaStoreObjectId2 = array4[j];
                        if (owaStoreObjectId2.StoreObjectId.ObjectType == StoreObjectType.MeetingRequest)
                        {
                            goto IL_FD;
                        }
                        if (owaStoreObjectId2.StoreObjectId.ObjectType == StoreObjectType.MeetingCancellation)
                        {
                            goto Block_12;
                        }
IL_10E:
                        j++;
                        continue;
Block_12:
                        try
                        {
IL_FD:
                            MeetingUtilities.DeleteMeetingMessageCalendarItem(owaStoreObjectId2.StoreObjectId);
                        }
                        catch (ObjectNotFoundException)
                        {
                        }
                        goto IL_10E;
                    }
                }
                base.InternalDelete(isPermanent, localItemIds);
            }
        }
コード例 #12
0
        public void RemoveFromCalendar()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingInviteEventHandler.RemoveFromCalendar");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");

            MeetingUtilities.DeleteMeetingMessageCalendarItem(owaStoreObjectId.StoreObjectId);
            base.Delete();
        }
コード例 #13
0
 // Token: 0x06001E1B RID: 7707 RVA: 0x000AE464 File Offset: 0x000AC664
 internal static ArrayList GetAttachmentInformation(OwaStoreObjectId owaConversationId, ItemPart itemPart, bool isLoggedOnFromPublicComputer, bool isEmbeddedItem, bool forceEnableItemLink)
 {
     if (itemPart.Attachments == null || itemPart.Attachments.Count == 0)
     {
         return(null);
     }
     return(AttachmentUtility.GetAttachmentList(owaConversationId, itemPart, isLoggedOnFromPublicComputer, isEmbeddedItem, true, forceEnableItemLink));
 }
コード例 #14
0
 protected void RenderJavascriptEncodedCalendarItemBaseMasterId()
 {
     if (this.calendarItemBase != null && (this.calendarItemBase.CalendarItemType == CalendarItemType.Occurrence || this.calendarItemBase.CalendarItemType == CalendarItemType.Exception))
     {
         OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromStoreObject(this.calendarItemBase);
         Utilities.JavascriptEncode(owaStoreObjectId.ProviderLevelItemId.ToString(), base.SanitizingResponse);
     }
 }
コード例 #15
0
        private void ProcessPost()
        {
            string text       = base.Request.Form["mId"];
            string text2      = base.Request.Form["mCK"];
            string bodyMarkup = base.Request.Form["sHtmlBdy"];

            if (!string.IsNullOrEmpty(text) && !string.IsNullOrEmpty(text2))
            {
                this.item = Utilities.GetItem <Item>(base.UserContext, text, text2, new PropertyDefinition[0]);
                if (base.UserContext.IsIrmEnabled)
                {
                    Utilities.IrmDecryptIfRestricted(this.item, base.UserContext, true);
                }
            }
            else
            {
                StoreObjectType itemType = StoreObjectType.Message;
                string          text3    = base.Request.Form["iT"];
                int             num;
                if (text3 != null && int.TryParse(text3, NumberStyles.Integer, CultureInfo.InvariantCulture, out num))
                {
                    itemType = (StoreObjectType)num;
                }
                OwaStoreObjectId destinationFolderId = null;
                string           text4 = base.Request.Form["sFldId"];
                if (!string.IsNullOrEmpty(text4))
                {
                    destinationFolderId = OwaStoreObjectId.CreateFromString(text4);
                }
                this.item = Utilities.CreateImplicitDraftItem(itemType, destinationFolderId);
                this.item.Save(SaveMode.ResolveConflicts);
                this.item.Load();
                if (Globals.ArePerfCountersEnabled)
                {
                    OwaSingleCounters.ItemsCreated.Increment();
                }
            }
            this.attachmentLinks = new List <SanitizedHtmlString>(base.Request.Files.Count);
            if (!this.IsInline)
            {
                this.attachResult = AttachmentUtility.AddAttachment(this.item, base.Request.Files, base.UserContext, false, bodyMarkup);
            }
            else
            {
                this.attachResult = AttachmentUtility.AddAttachment(this.item, base.Request.Files, base.UserContext, true, bodyMarkup, out this.attachmentLinks);
            }
            this.item.Load();
            if (Globals.ArePerfCountersEnabled)
            {
                OwaSingleCounters.ItemsUpdated.Increment();
            }
            if (!this.IsInline)
            {
                this.attachmentWellRenderObjects = null;
                bool isPublicLogon = base.UserContext.IsPublicLogon;
                this.attachmentWellRenderObjects = AttachmentWell.GetAttachmentInformation(this.item, null, isPublicLogon);
            }
        }
コード例 #16
0
        public void RemoveRestriction()
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");

            using (MessageItem item = Utilities.GetItem <MessageItem>(base.UserContext, owaStoreObjectId, false, new PropertyDefinition[0]))
            {
                Utilities.IrmRemoveRestriction(item, base.UserContext);
            }
        }
コード例 #17
0
        private void ProcessFolderCountAdvisor(OwaFolderCountAdvisor folderCountAdvisor)
        {
            if (folderCountAdvisor == null)
            {
                throw new ArgumentNullException("folderCountAdvisor");
            }
            MailboxSession mailboxSession = null;

            if (folderCountAdvisor.FolderId == null)
            {
                if (!folderCountAdvisor.MailboxOwner.MailboxInfo.IsAggregated)
                {
                    mailboxSession = base.UserContext.MailboxSession;
                }
                else
                {
                    mailboxSession = base.UserContext.GetArchiveMailboxSession(folderCountAdvisor.MailboxOwner);
                }
            }
            else
            {
                try
                {
                    mailboxSession = (folderCountAdvisor.FolderId.GetSession(base.UserContext) as MailboxSession);
                }
                catch (ObjectNotFoundException)
                {
                    return;
                }
            }
            if (mailboxSession != null)
            {
                Dictionary <StoreObjectId, ItemCountPair> itemCounts = folderCountAdvisor.GetItemCounts(mailboxSession);
                if (itemCounts == null)
                {
                    return;
                }
                IDictionaryEnumerator dictionaryEnumerator = itemCounts.GetEnumerator();
                while (dictionaryEnumerator.MoveNext())
                {
                    ItemCountPair countPair = (ItemCountPair)dictionaryEnumerator.Value;
                    if (countPair.ItemCount != -1L || countPair.UnreadItemCount != -1L)
                    {
                        OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromSessionFolderId(base.UserContext, mailboxSession, (StoreObjectId)dictionaryEnumerator.Key);
                        this.RenderUpdateCountJavascript(owaStoreObjectId, countPair);
                        if (owaStoreObjectId.StoreObjectType == StoreObjectType.Folder)
                        {
                            StoreObjectId folderId = StoreObjectId.FromProviderSpecificId(owaStoreObjectId.StoreObjectId.ProviderLevelItemId, StoreObjectType.OutlookSearchFolder);
                            this.RenderUpdateCountJavascript(OwaStoreObjectId.CreateFromSessionFolderId(base.UserContext, mailboxSession, folderId), countPair);
                            StoreObjectId folderId2 = StoreObjectId.FromProviderSpecificId(owaStoreObjectId.StoreObjectId.ProviderLevelItemId, StoreObjectType.SearchFolder);
                            this.RenderUpdateCountJavascript(OwaStoreObjectId.CreateFromSessionFolderId(base.UserContext, mailboxSession, folderId2), countPair);
                        }
                    }
                }
                return;
            }
        }
コード例 #18
0
 // Token: 0x06002EB6 RID: 11958 RVA: 0x0010BFA4 File Offset: 0x0010A1A4
 private void RenderOpenOtherUserFolderReponse(string folderClassName, OwaStoreObjectId folderId)
 {
     this.Writer.Write("<div id=fldrurl>");
     this.Writer.Write("?ae=Folder&t=");
     Utilities.HtmlEncode(Utilities.UrlEncode(folderClassName), this.Writer);
     this.Writer.Write("&id=");
     Utilities.HtmlEncode(Utilities.UrlEncode(folderId.ToBase64String()), this.Writer);
     this.Writer.Write("</div>");
 }
コード例 #19
0
        public void Send()
        {
            ExTraceGlobals.CalendarCallTracer.TraceDebug((long)this.GetHashCode(), "EditMeetingResponseEventHandler.SendEditResponse");
            MeetingResponse meetingResponse = base.GetRequestItem <MeetingResponse>(new PropertyDefinition[0]);

            try
            {
                if (base.UpdateMessage(meetingResponse, StoreObjectType.MeetingMessage))
                {
                    throw new OwaEventHandlerException("Unresolved recipients", LocalizedStrings.GetNonEncoded(2063734279));
                }
                if (meetingResponse.Recipients.Count == 0)
                {
                    throw new OwaEventHandlerException("No recipients", LocalizedStrings.GetNonEncoded(1878192149));
                }
                if (Utilities.RecipientsOnlyHaveEmptyPDL <Recipient>(base.UserContext, meetingResponse.Recipients))
                {
                    base.RenderPartialFailure(1389137820);
                }
                else
                {
                    this.HandleSendOnBehalf(meetingResponse);
                    base.SaveHideMailTipsByDefault();
                    ExTraceGlobals.CalendarTracer.TraceDebug((long)this.GetHashCode(), "Sending meeting response");
                    meetingResponse.Send();
                    OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("IdM");
                    if (owaStoreObjectId != null)
                    {
                        object parameter = base.GetParameter("PermanentDelete");
                        bool   flag      = parameter is bool && (bool)parameter;
                        if (flag)
                        {
                            Utilities.Delete(base.UserContext, DeleteItemFlags.SoftDelete, new OwaStoreObjectId[]
                            {
                                owaStoreObjectId
                            });
                        }
                        else
                        {
                            Utilities.Delete(base.UserContext, DeleteItemFlags.MoveToDeletedItems, new OwaStoreObjectId[]
                            {
                                owaStoreObjectId
                            });
                        }
                    }
                }
            }
            finally
            {
                if (meetingResponse != null)
                {
                    meetingResponse.Dispose();
                    meetingResponse = null;
                }
            }
        }
        public void ExpandConversation()
        {
            if (!this.IsConversationView)
            {
                throw new OwaInvalidRequestException("Attempt to expand a conversation in a non-conversation view");
            }
            OwaStoreObjectId expId = (OwaStoreObjectId)base.GetParameter("expId");

            this.InternalExpandConversation(expId);
        }
コード例 #21
0
        private void DoDelete(bool permanentDelete, bool doThrow)
        {
            ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ItemEventHandler." + (permanentDelete ? "PermanentDelete" : "Delete"));
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");

            Utilities.Delete(base.UserContext, permanentDelete, doThrow, new OwaStoreObjectId[]
            {
                owaStoreObjectId
            });
        }
        // Token: 0x06002E91 RID: 11921 RVA: 0x00109FD8 File Offset: 0x001081D8
        protected override void PersistSort()
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)this.ListViewState.SourceContainerId;

            if (owaStoreObjectId.IsPublic && this.ListViewState.SortedColumn == ColumnId.ConversationLastDeliveryTime)
            {
                throw new OwaInvalidRequestException("Cannot arrange by conversation in a public folder");
            }
            base.PersistSort();
        }
コード例 #23
0
        public void EmptyDeletedItems()
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("id");

            if (!Utilities.IsDefaultFolderId(base.UserContext, owaStoreObjectId, DefaultFolderType.DeletedItems))
            {
                throw new OwaInvalidRequestException("Can only perform EmptyDeletedItems operation on DeletedItems folder");
            }
            owaStoreObjectId.GetSession(base.UserContext).DeleteAllObjects(DeleteItemFlags.SoftDelete, owaStoreObjectId.StoreObjectId);
        }
コード例 #24
0
        // Token: 0x06002926 RID: 10534 RVA: 0x000E9020 File Offset: 0x000E7220
        protected void RenderJavascriptEncodedCalendarItemBaseMasterId()
        {
            CalendarItemBase calendarItemBase = this.meetingPageWriter.CalendarItemBase;

            if (this.isCalendarItem && !base.IsEmbeddedItem && !base.IsInDeleteItems && (calendarItemBase.CalendarItemType == CalendarItemType.Occurrence || calendarItemBase.CalendarItemType == CalendarItemType.Exception))
            {
                OwaStoreObjectId owaStoreObjectId = OwaStoreObjectId.CreateFromStoreObject(calendarItemBase);
                Utilities.JavascriptEncode(owaStoreObjectId.ProviderLevelItemId.ToString(), base.Response.Output);
            }
        }
コード例 #25
0
        public void SendReadReceipt()
        {
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id");

            using (MessageItem item = Utilities.GetItem <MessageItem>(base.UserContext, owaStoreObjectId, true, new PropertyDefinition[0]))
            {
                item.SendReadReceipt();
            }
            this.Writer.Write(LocalizedStrings.GetHtmlEncoded(641302712));
        }
コード例 #26
0
		// Token: 0x06002EC4 RID: 11972 RVA: 0x0010CA34 File Offset: 0x0010AC34
		private void RenderUpdateCountJavascript(OwaStoreObjectId folderId, ItemCountPair countPair)
		{
			this.Writer.Write("updCnt(\"");
			Utilities.JavascriptEncode(folderId.ToBase64String(), this.Writer);
			this.Writer.Write("\",");
			this.Writer.Write(countPair.ItemCount);
			this.Writer.Write(",");
			this.Writer.Write(countPair.UnreadItemCount);
			this.Writer.Write(");");
		}
コード例 #27
0
        public void SetDueDate()
        {
            ExTraceGlobals.TasksCallTracer.TraceDebug((long)this.GetHashCode(), "TaskVirtualListViewEventHandler.SetDueDate");
            ExDateTime?      exDateTime       = (ExDateTime?)base.GetParameter("ddt");
            OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("id");

            using (Item item = Utilities.GetItem <Item>(base.UserContext, owaStoreObjectId, this.prefetchProperties))
            {
                TaskVirtualListViewEventHandler.ThrowIfAssignedTask(item);
                item.OpenAsReadWrite();
                Task task = item as Task;
                if (task != null)
                {
                    task.DueDate = exDateTime;
                    if (task.StartDate != null && exDateTime != null && task.StartDate.Value > exDateTime.Value)
                    {
                        task.StartDate = exDateTime;
                    }
                }
                else
                {
                    string     property  = ItemUtility.GetProperty <string>(item, ItemSchema.FlagRequest, LocalizedStrings.GetNonEncoded(-1950847676));
                    ExDateTime?startDate = ItemUtility.GetProperty <ExDateTime?>(item, ItemSchema.UtcStartDate, null);
                    if (exDateTime == null)
                    {
                        startDate = null;
                    }
                    else if (startDate != null && startDate.Value > exDateTime.Value)
                    {
                        startDate = exDateTime;
                    }
                    item.SetFlag(property, startDate, exDateTime);
                }
                Utilities.SaveItem(item);
                this.Writer.Write("<div id=data dtDD=\"");
                ExDateTime date  = DateTimeUtilities.GetLocalTime().Date;
                ExDateTime date2 = (exDateTime != null) ? exDateTime.Value : date;
                this.Writer.Write(DateTimeUtilities.GetJavascriptDate(date2));
                this.Writer.Write("\"");
                if (exDateTime != null && exDateTime.Value.Date < date)
                {
                    this.Writer.Write(" fOD=1");
                }
                this.Writer.Write(">");
                if (exDateTime != null)
                {
                    this.Writer.Write(exDateTime.Value.ToString(base.UserContext.UserOptions.DateFormat));
                }
                else
                {
                    this.Writer.Write("&nbsp;");
                }
                this.Writer.Write("</div>");
            }
        }
コード例 #28
0
ファイル: DatePicker.cs プロジェクト: YHZX2013/exchange_diff
        private void GetFreeBusy()
        {
            DateTime dateTime   = this.dates[0];
            DateTime arg        = this.dates[41];
            Duration timeWindow = new Duration(dateTime, arg.AddDays(1.0));

            ExTraceGlobals.CalendarTracer.TraceDebug <DateTime, DateTime>((long)this.GetHashCode(), "Getting free/busy data from {0} to {1}", dateTime, arg);
            OwaStoreObjectId calendarFolderId = OwaStoreObjectId.CreateFromSessionFolderId(this.owaContext.UserContext, this.owaContext.UserContext.MailboxSession, this.folderId);

            this.freeBusyData = Utilities.GetFreeBusyDataForDatePicker(timeWindow, calendarFolderId, this.owaContext.UserContext);
        }
コード例 #29
0
 // Token: 0x060023D4 RID: 9172 RVA: 0x000CE900 File Offset: 0x000CCB00
 internal override void UnSubscribeForFolderContentChanges()
 {
     if (OwaMapiNotificationManager.IsNotificationEnabled(base.UserContext) && !Utilities.IsPublic(this.contextFolder))
     {
         OwaStoreObjectId folderId = OwaStoreObjectId.CreateFromSessionFolderId(base.UserContext, this.contextFolder.Session, this.contextFolder.Id.ObjectId);
         if (base.UserContext.IsPushNotificationsEnabled)
         {
             base.UserContext.MapiNotificationManager.UnsubscribeFolderContentChanges(folderId);
         }
     }
 }
コード例 #30
0
        // Token: 0x060023D7 RID: 9175 RVA: 0x000CEAD0 File Offset: 0x000CCCD0
        public OwaStoreObjectId GetNewSelectionId()
        {
            OwaStoreObjectId         result = null;
            FolderListViewDataSource folderListViewDataSource = base.Contents.DataSource as FolderListViewDataSource;

            if (folderListViewDataSource != null)
            {
                result = folderListViewDataSource.NewSelectionId;
            }
            return(result);
        }