Пример #1
0
        public void AddCtrl(FieldBaseType ctrl)
        {
            SectionExt section = GetCurrent();

            ctrl.ClientId = string.Concat("uds_", section.SectionId, "_", ctrl.ColumnName, "_", section.Ctrls.Count());
            section.Ctrls.Add(ctrl);
        }
Пример #2
0
        private bool ParseDocument(Element el)
        {
            if (el.collectionType == "*")
            {
                return(true);
            }

            SectionExt section = sections.GetCurrent();

            Document doc = new Document
            {
                Label               = el.label,
                AllowMultiFile      = el.enableMultifile,
                BiblosArchive       = el.archive,
                UploadEnabled       = el.enableUpload,
                ScannerEnabled      = el.enableScanner,
                SignEnabled         = el.enableSign,
                SignRequired        = el.signRequired,
                CopyProtocol        = el.copyProtocol,
                CopyResolution      = el.copyResolution,
                CopyUDS             = el.copyUDS,
                CopySeries          = el.copySeries,
                CreateBiblosArchive = el.createBiblosArchive,
                Required            = el.required,
                Searchable          = el.searchable,
                Deletable           = el.documentDeletable,
                ModifyEnabled       = el.modifyEnable,
                ClientId            = el.clientId,
                Layout              = new LayoutPosition
                {
                    PanelId   = el.columns.ToString(),
                    ColNumber = el.columns,
                    RowNumber = el.rows
                }
            };

            doc.ClientId = string.Concat("uds_doc_", el.collectionType, "_", documents.Count);
            //impedisce duplicati
            try
            {
                documents.Add(el.collectionType, doc);
            }
            catch
            {
                throw new ApplicationException(String.Format("Collezione '{0}' duplicata.", el.collectionType));
            }

            //verifica esista collezione documenti
            if (!documents.ContainsKey(UDSConverter.collectionDocument))
            {
                throw new ApplicationException(String.Format("Collezione '{0}' mancante.", UDSConverter.collectionDocument));
            }

            return(true);
        }
Пример #3
0
        private bool ParseTitle(Element el)
        {
            title                   = el.label;
            subject                 = el.subject;
            enabledWorkflow         = el.enabledWorkflow;
            enabledProtocol         = el.enabledProtocol;
            enabledCancelMotivation = el.enabledCancelMotivation;

            hideRegistrationIdentifier          = el.hideRegistrationIdentifier;
            stampaConformeEnabled               = el.stampaConformeEnabled;
            showArchiveInProtocolSummaryEnabled = el.showArchiveInProtocolSummaryEnabled;
            requiredRevisionUDSRepository       = el.requiredRevisionUDSRepository;

            enabledPEC                 = el.enabledPEC;
            enabledPECButton           = el.enabledPECButton;
            enabledMailButton          = el.enabledMailButton;
            enabledMailRoleButton      = el.enabledMailRoleButton;
            enabledLinkButton          = el.enabledLinkButton;
            enabledCQRSSync            = el.enabledCQRSSync;
            incrementalIdentityEnabled = el.incrementalIdentityEnabled;
            alias               = el.alias;
            createContainer     = el.createContainer;
            resultVisibility    = el.subjectResultVisibility;
            showLastChangedDate = el.showLastChangedDate;
            showLastChangedUser = el.showLastChangedUser;

            SectionExt section = sections.GetCurrent();

            category = new Category
            {
                IdCategory       = el.idCategory,
                ReadOnly         = el.categoryReadOnly,
                Searchable       = el.categorySearchable,
                ModifyEnabled    = el.modifyEnable,
                DefaultEnabled   = el.categoryDefaultEnabled,
                ResultVisibility = el.categoryResultVisibility
            };

            container = new Container()
            {
                IdContainer     = el.idContainer,
                Searchable      = el.containerSearchable,
                CreateContainer = el.createContainer
            };

            return(true);
        }
Пример #4
0
        private bool ParseContact(Element el)
        {
            SectionExt section = sections.GetCurrent();

            Contacts contact = new Contacts
            {
                Label = el.label,
                ADDistributionListEnabled = el.enableADDistribution,
                AddressBookEnabled        = el.enableAddressBook,
                ADEnabled          = el.enableAD,
                AllowMultiContact  = el.enableMultiContact,
                ExcelImportEnabled = el.enableExcelImport,
                ManualEnabled      = el.enableManual,
                Required           = el.required,
                Searchable         = el.searchable,
                ClientId           = el.clientId,
                ModifyEnabled      = el.modifyEnable,
                ResultPosition     = el.resultPosition,
                ResultVisibility   = el.resultVisibility,
                Layout             = new LayoutPosition
                {
                    PanelId   = el.columns.ToString(),
                    ColNumber = el.columns,
                    RowNumber = el.rows
                }
            };

            contact.ContactTypeSpecified = true;
            contact.ContactType          = ContactType.None;
            if (!string.IsNullOrEmpty(el.contactTypeSelected) && _contactTypeDescriptions.Any(x => x.Value == el.contactTypeSelected))
            {
                contact.ContactType = _contactTypeDescriptions.Single(x => x.Value == el.contactTypeSelected).Key;
            }

            contact.ClientId = string.Concat("uds_contact_", el.collectionType, "_", contacts.Count);
            contacts.Add(contact);

            return(true);
        }
Пример #5
0
        private bool ParseAuthorization(Element el)
        {
            SectionExt section = sections.GetCurrent();

            authorizations = new Authorizations
            {
                Label = el.label,
                AllowMultiAuthorization = el.enableMultiAuth,
                Required         = el.required,
                Searchable       = el.searchable,
                ClientId         = el.clientId,
                ModifyEnabled    = el.modifyEnable,
                ResultVisibility = el.resultVisibility,
                ResultPosition   = el.resultPosition,
                Layout           = new LayoutPosition
                {
                    PanelId   = el.columns.ToString(),
                    ColNumber = el.columns,
                    RowNumber = el.rows
                }
            };
            authorizations.ClientId = string.Concat("uds_auth_", el.collectionType, "_", section.Ctrls.Count);
            return(true);
        }