コード例 #1
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);
            }
        }
コード例 #2
0
        // Token: 0x06000432 RID: 1074 RVA: 0x00023E34 File Offset: 0x00022034
        private void AddAttachments()
        {
            InfobarMessageType  type = InfobarMessageType.Error;
            AttachmentAddResult attachmentAddResult = AttachmentUtility.AddAttachment(base.Item, base.Request.Files, base.UserContext);

            if (attachmentAddResult.ResultCode != AttachmentAddResultCode.NoError)
            {
                base.Infobar.AddMessageHtml(attachmentAddResult.Message, type);
            }
            base.Item.Load();
            if (attachmentAddResult.ResultCode != AttachmentAddResultCode.IrresolvableConflictWhenSaving)
            {
                this.changeKeyString = base.Item.Id.ChangeKeyAsBase64String();
            }
            if (Globals.ArePerfCountersEnabled)
            {
                OwaSingleCounters.ItemsUpdated.Increment();
            }
        }