setName() публичный Метод

public setName ( String rhs ) : void
rhs String
Результат void
Пример #1
0
 private void pSetName(cReportGroup c, String name)
 {
     c.setName(pSetName(c.getName(), name));
 }
Пример #2
0
        private void pShowGroupProperties(cReportGroup group)
        {

            try {

                bool isNew = false;

                m_showingProperties = true;

                if (m_fGroup == null) { m_fGroup = new fGroup(); }

                m_fGroup.setHandler(this);

                if (group == null) { isNew = true; }

                if (isNew) {
                    m_fGroup.txName.Text = "Group" + m_report.getGroups().count() + 1;
                }
                else {
                    m_fGroup.txName.Text = group.getName();
                    m_fGroup.txDbField.Text = group.getFieldName();

                    if (group.getOderType() == csRptGrpOrderType.CSRPTGRPASC) {
                      m_fGroup.opAsc.Checked = true;
                    }
                    else {
                      m_fGroup.opDesc.Checked = true;
                    }

                    m_fGroup.chkPrintInNewPage.Checked = group.getPrintInNewPage();
                    m_fGroup.chkReprintGroup.Checked = group.getRePrintInNewPage();
                    m_fGroup.chkGrandTotal.Checked = group.getGrandTotalGroup();

                    switch (group.getComparisonType()) {
                      case  csRptGrpComparisonType.CSRPTGRPDATE:
                        m_fGroup.opDate.Checked = true;
                        break;

                      case  csRptGrpComparisonType.CSRPTGRPNUMBER:
                        m_fGroup.opNumber.Checked = true;
                        break;

                      case  csRptGrpComparisonType.CSRPTGRPTEXT:
                        m_fGroup.opText.Checked = true;
                        break;
                    }
                }

                m_fGroup.lbGroup.Text = "Group: " + m_fGroup.txName.Text;

                m_fGroup.ShowDialog();

                if (m_fGroup.getOk())
                {

                    if (isNew)
                    {
                        group = m_report.getGroups().add(null, "");
                    }

                    group.setName(m_fGroup.txName.Text);
                    group.setFieldName(m_fGroup.txDbField.Text);

                    group.setIndex(m_report.getGroups().Count);
                    group.setOderType(m_fGroup.opAsc.Checked ? csRptGrpOrderType.CSRPTGRPASC : csRptGrpOrderType.CSRPTGRPDESC);

                    group.setPrintInNewPage(m_fGroup.chkPrintInNewPage.Checked);
                    group.setRePrintInNewPage(m_fGroup.chkReprintGroup.Checked);
                    group.setGrandTotalGroup(m_fGroup.chkGrandTotal.Checked);

                    if (m_fGroup.opDate.Checked)
                    {
                        group.setComparisonType(csRptGrpComparisonType.CSRPTGRPDATE);
                    }
                    else if (m_fGroup.opNumber.Checked)
                    {
                        group.setComparisonType(csRptGrpComparisonType.CSRPTGRPNUMBER);
                    }
                    else if (m_fGroup.opText.Checked)
                    {
                        group.setComparisonType(csRptGrpComparisonType.CSRPTGRPTEXT);
                    }

                    if (isNew)
                    {
                        addSection(csRptSectionType.GROUP_HEADER);
                        addSection(csRptSectionType.GROUP_FOOTER);
                    }

                    m_dataHasChanged = true;
                }

            } catch (Exception ex) {
                cError.mngError(ex, "showGroupProperties", C_MODULE, "");
            }
            finally {
                m_showingProperties = false;
                if (m_fGroup != null)
                {
                    m_fGroup.Close();
                    m_fGroup = null;
                }
            }
        }
Пример #3
0
 private void pSetName(cReportGroup c, String name)
 {
     c.setName(pSetName(c.getName(), name));
 }