Example #1
0
        protected void BaseConstructor(Application applicationReference, Server.Application.Correspondence serverObject)
        {
            base.BaseConstructor(applicationReference, serverObject);


            version = serverObject.Version;

            formId = serverObject.FormId;

            storeImage = serverObject.StoreImage;



            Int32 contentIndex = 0;

            foreach (Server.Application.CorrespondenceContent currentServerCorrespondenceContent in serverObject.Content.Values)
            {
                contentIndex = contentIndex + 1;

                CorrespondenceContent correspondenceContent = new CorrespondenceContent(application, currentServerCorrespondenceContent);

                correspondenceContent.CorrespondenceId = id;

                correspondenceContent.ContentSequence = contentIndex;

                content.Add(contentIndex, correspondenceContent);
            }


            return;
        }
        public CorrespondenceContent Copy()
        {
            Server.Application.CorrespondenceContent serverCorrespondenceContent = (Server.Application.CorrespondenceContent)ToServerObject();

            CorrespondenceContent copiedCorrespondenceContent = new CorrespondenceContent(application, serverCorrespondenceContent);

            return(copiedCorrespondenceContent);
        }
Example #3
0
        public void AppendContent(CorrespondenceContent correspondenceContent)
        {
            if (!ContentExists(correspondenceContent))
            {
                correspondenceContent.CorrespondenceId = Id;

                correspondenceContent.ContentSequence = content.Keys.Count + 1;

                content.Add(correspondenceContent.ContentSequence, correspondenceContent);
            }

            return;
        }
Example #4
0
        public void LoadContentAttachments()
        {
            foreach (CorrespondenceContent currentContent in content.Values)
            {
                CorrespondenceContent loadedContent = application.CorrespondenceContentGet(currentContent.Id, false);

                if (loadedContent != null)
                {
                    currentContent.AttachmentBase64 = loadedContent.AttachmentBase64;
                }
            }

            return;
        }
Example #5
0
        public Boolean ContentExists(CorrespondenceContent correspondenceContent)
        {
            Boolean exists = false;

            foreach (Int32 currentSequence in content.Keys)
            {
                exists = content[currentSequence].IsEqual(correspondenceContent);

                if (exists)
                {
                    break;
                }
            }

            return(exists);
        }
        public Boolean IsEqual(CorrespondenceContent compareCorrespondenceContent)
        {
            Boolean isEqual = base.IsEqual((CoreObject)compareCorrespondenceContent);


            isEqual &= (ReportName == compareCorrespondenceContent.ReportName);

            isEqual &= (ContentType == compareCorrespondenceContent.ContentType);

            isEqual &= (ReportingServerId == compareCorrespondenceContent.ReportingServerId);

            isEqual &= (IsAttachmentCompressed == compareCorrespondenceContent.IsAttachmentCompressed);

            isEqual &= (attachmentBase64 == compareCorrespondenceContent.attachmentBase64);

            isEqual &= (attachmentXpsBase64 == compareCorrespondenceContent.attachmentXpsBase64);

            return(isEqual);
        }