コード例 #1
0
        public void ShowSectionConfig(JReportTemplateSection section, List <FormItem> elementNames, IWin32Window owner)
        {
            _section      = section;
            _elementNames = elementNames;

            this.ShowDialog(owner);
        }
コード例 #2
0
        private void tsbSectionConfig_Click(object sender, EventArgs e)
        {
            try
            {
                if (designerControl1 == null)
                {
                    return;
                }

                JReportTemplateSection section = _reportItem.关联段落;

                frmReportSectionConfig sectionConfig = new frmReportSectionConfig(_dbHelper);
                sectionConfig.OnSaveReportSection += SaveReportSection;

                Header          hd       = null;
                Footer          fd       = null;
                List <FormItem> elements = designerControl1.getAllFormItems(out hd, out fd);

                sectionConfig.ShowSectionConfig(section, elements, this);
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
コード例 #3
0
        private void LoadTemplateWord(string imageKind, string templateId, string formatId)
        {
            if (_imageKind != imageKind)
            {
                _imageKind = imageKind;

                BindWordClassData();
            }


            DataTable dtWordReleations = null;

            if (string.IsNullOrEmpty(formatId) == false)
            {
                //先查询格式对应的词句信息,如果格式没有设置词句关联,则查询对应模板的词句关联设置
                if (_reportFormatId == formatId)
                {
                    return;
                }

                dtWordReleations = ReportWordsModel.GetFormatWordClass(formatId);
            }

            if (dtWordReleations == null)
            {
                if (_templateWords == null || _reportTemplateId != templateId)
                {
                    _templateWords = ReportWordsModel.GetTemplateWordClass(templateId);
                }

                dtWordReleations = _templateWords;
            }

            if (_reportTemplateId != templateId)
            {
                _templateSection = ReportWordsModel.GetTemplateSection(templateId);
            }


            _reportTemplateId = templateId;
            _reportFormatId   = formatId;



            BindReleationWords(dtWordReleations);

            if (treeView1.Nodes.Count > 0)
            {
                treeView1.Nodes[0].Expand();
            }
        }
コード例 #4
0
        private void BindSection(JReportTemplateSection section)
        {
            InitList();

            foreach (JReportSectionItem jsi in section.段落关联信息)
            {
                if (string.IsNullOrEmpty(jsi.模板元素名))
                {
                    continue;
                }


                ListViewItem itemNew = new ListViewItem(new string[] { (string.IsNullOrEmpty(jsi.段落显示名)) ? jsi.报告段落名 : jsi.段落显示名, jsi.模板元素名, ((jsi.关联存储) ? "√" : "") }, 0);

                itemNew.ToolTipText = jsi.报告段落名;

                lbxSection.Items.Add(itemNew);
            }

            lbxSection.View = View.Details;
        }
コード例 #5
0
        public void SaveReportSection(JReportTemplateSection section)
        {
            BindSection(section);

            IsModify = true;
        }