예제 #1
0
        /// <summary>
        /// Импортировать XML-описание блока.
        /// </summary>
        /// <param name="path">Путь к папке с моделью</param>
        /// <param name="requisites">Список реквизитов.</param>
        private void ImportProperties(string path, List <RequisiteModel> requisites)
        {
            var workflowBlockPropertiesFileName = GetPropertiesFileName(path);
            var workflowBlockProperties         = new XmlDocument();

            workflowBlockProperties.Load(workflowBlockPropertiesFileName);
            this.ImportSettingsNode(path, workflowBlockProperties);
            var workflowBlockPropertiesText      = GetIsBuilderFormattedXml(workflowBlockProperties);
            var workflowBlockPropertiesRequisite = RequisiteModel.CreateFromText("Properties", workflowBlockPropertiesText);

            requisites.Add(workflowBlockPropertiesRequisite);
        }
        /// <summary>
        /// Импортировать детальный раздел событий реквизитов.
        /// </summary>
        /// <param name="path">Путь к файлам модели.</param>
        /// <param name="requisites">Список реквизитов.</param>
        private void ImportRequisiteEvents(string path, List <RequisiteModel> requisites)
        {
            var requisiteCodeRequisite = requisites.FirstOrDefault(r => r.Code == "ISBEDocTypeReqCode");
            var requisiteCode          = requisiteCodeRequisite.DecodedText;
            var requisitePath          = GetRequisitePath(path, requisiteCode);

            var changeEventRequisite = RequisiteModel.CreateFromFile("ISBEDocTypeReqOnChange", GetRequisiteChangeEventFileName(requisitePath));

            requisites.Add(changeEventRequisite);

            var selectEventRequisiteValue = this.LoadEventsFromFolder(requisitePath);
            var selectEventRequisite      = RequisiteModel.CreateFromText("ISBEDocTypeReqOnSelect", selectEventRequisiteValue);

            requisites.Add(selectEventRequisite);
        }
        /// <summary>
        /// Импортировать реквизиты карточки.
        /// </summary>
        /// <param name="path">Путь к файлам модели.</param>
        /// <param name="requisites">Список реквизитов.</param>
        private void ImportCardRequisites(string path, List <RequisiteModel> requisites)
        {
            var commentRequisite = RequisiteModel.CreateFromFile("ISBEDocTypeComment", GetCommentFileName(path));

            requisites.Add(commentRequisite);
            var paramsRequisite = RequisiteModel.CreateFromFile("ISBEDocTypeAddParams", GetParamsFileName(path));

            requisites.Add(paramsRequisite);

            var eventsPath         = GetEventsPath(path);
            var eventTextValue     = this.LoadEventsFromFolder(eventsPath);
            var eventTextRequisite = RequisiteModel.CreateFromText("ISBEDocTypeEventText", eventTextValue);

            requisites.Add(eventTextRequisite);
        }
        /// <summary>
        /// Импортировать реквизиты карточки.
        /// </summary>
        /// <param name="path">Путь к файлам модели.</param>
        /// <param name="requisites">Список реквизитов.</param>
        private void ImportCardRequisites(string path, List <RequisiteModel> requisites)
        {
            var formRequisite = RequisiteModel.CreateFromFile("ISBDialogForm", GetCardFormFileName(path));

            requisites.Add(formRequisite);
            var commentRequisite = RequisiteModel.CreateFromFile("ISBDialogComment", GetCommentFileName(path));

            requisites.Add(commentRequisite);

            var eventsPath         = GetEventsPath(path);
            var eventTextValue     = this.LoadEventsFromFolder(eventsPath);
            var eventTextRequisite = RequisiteModel.CreateFromText("ISBDialogEventText", eventTextValue);

            requisites.Add(eventTextRequisite);
        }