Ejemplo n.º 1
0
        // public const string XMLNODE_LINK = "link"; // Later version"s will support link collections

        public static CReportItem CreateItemFromXMLNode(XmlNode aXmlNode)
        {
            CReportItem lResult = null;

            if (aXmlNode.Name == XMLNODE_FOLDER)
            {
                lResult = new CReportFolder(aXmlNode.Attributes["name"].Value);
            }
            else
            if (aXmlNode.Name == XMLNODE_REPORT)
            {
                lResult = new CReportFile(aXmlNode.Attributes["name"].Value, aXmlNode.Attributes["path"].Value);
            }
            else
            {
                lResult = new CReportItem(aXmlNode.Attributes["name"].Value);
            }

            return(lResult);
        }
Ejemplo n.º 2
0
        // public const string XMLNODE_LINK = "link"; // Later version"s will support link collections
        public static CReportItem CreateItemFromXMLNode(XmlNode aXmlNode)
        {
            CReportItem lResult = null;

                    if (aXmlNode.Name == XMLNODE_FOLDER) {
                            lResult = new CReportFolder(aXmlNode.Attributes["name"].Value);
                        } else
                    if (aXmlNode.Name == XMLNODE_REPORT) {
                            lResult = new CReportFile(aXmlNode.Attributes["name"].Value, aXmlNode.Attributes["path"].Value);
                        } else
                    lResult = new CReportItem(aXmlNode.Attributes["name"].Value);

                    return lResult;
        }
Ejemplo n.º 3
0
        public void DoAddReport()
        {
            XmlNode lThisData = RsViewEngine.Locale.GetFormData(LOCALE_ALIAS);

            RsReportCollection lCurrColl = getSelectedCollection();
            if (lCurrColl == null)
                CRSMessageBox.ShowBox(
                            XmlTools.getXmlNodeByAttrVal("name", NOCOLLECTION_FILE, lThisData).InnerText,
                            RsViewEngine.Locale.GetTagText("error"),
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Exclamation
                        );

            else
            {
                if (lCurrColl is CFavoritesCollection)
                    _dlgAddReport.CollectionName = RsViewEngine.Locale.GetTagText(RsLocalization.TAG_FAVORITES);
                else
                    _dlgAddReport.CollectionName = lCurrColl.CollectionName;
                _dlgAddReport.Modify = false;
                DialogResult lDlgRes = _dlgAddReport.ShowDialog();
                if (lDlgRes == DialogResult.OK)
                {
                    CReportFolder lParent = getCurrentParent();
                    if (lParent == null)
                    {
                        CRSMessageBox.ShowBox(
                                    RsViewEngine.Locale.GetTagText("collectionNotSelected"),
                                    RsViewEngine.Locale.GetTagText("error"),
                                    MessageBoxButtons.OK,
                                    MessageBoxIcon.Exclamation);
                        return;
                    }
                    CReportFile lNewFile = new CReportFile(_dlgAddReport.Alias, _dlgAddReport.ReportFile);
                    lNewFile.Parent = lParent;
                    lParent.Collection.ApplyToGUI();
                    lParent.Collection.QuickSave();
                }
            }
        }
Ejemplo n.º 4
0
 public RsCollectionReport(CReportFile aReportFile) : base(aReportFile)
 {
 }
Ejemplo n.º 5
0
 public RsCollectionReport(CReportFile aReportFile)
     : base(aReportFile)
 {
 }