예제 #1
0
        public void AddDataSourceSecurity(string aDataSource, string aUserID, string aPassword)
        {
            XmlNode lNode = XmlTools.getXmlNodeByAttrVal(XML_DSSEC, XMLa_DATASOURCE, aDataSource, _SecRoot);

            if (lNode != null)
            {
                CReportSecurityItem lSec = new CReportSecurityItem(this, lNode);
                lSec.DataSource = aDataSource;
                lSec.UserName   = aUserID;
                lSec.Password   = aPassword;
                lSec.Authorize  = true;
                lSec.PostSettings();
            }
            else
            {
                XmlNode lReportSecurity = XmlTools.CreateXmlNode(_SecurityDoc, XML_DSSEC, _SecRoot);

                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_AUTH, "yes");
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_DATASOURCE, aDataSource);
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_USERID, aUserID);
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_PASSWORD, aPassword);

                _SecurityDoc.Save(_SecurityFile);
            }
        }
예제 #2
0
        public void AddReportSecurity(string aReportFile, string aDataSource)
        {
            XmlNode lNode = XmlTools.getXmlNodeByAttrVal(XML_REPORTSEC, XMLa_FILE, aReportFile, _SecRoot);

            if (lNode != null)
            {
                CReportSecurityItem lSec = new CReportSecurityItem(this, lNode);
                lSec.DataSource = aDataSource;
                lSec.UserName   = "";
                lSec.Password   = "";
                lSec.Authorize  = false;
                lSec.PostSettings();
            }
            else
            {
                XmlNode lReportSecurity = XmlTools.CreateXmlNode(_SecurityDoc, XML_REPORTSEC, _SecRoot);

                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_AUTH, "no");
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_FILE, aReportFile);
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_DATASOURCE, aDataSource);
            }

            _SecurityDoc.Save(_SecurityFile);
        }
예제 #3
0
        public void AddReportSecurity(string aReportFile, string aDataSource)
        {
            XmlNode lNode = XmlTools.getXmlNodeByAttrVal(XML_REPORTSEC, XMLa_FILE, aReportFile, _SecRoot);

            if (lNode != null)
            {
                CReportSecurityItem lSec = new CReportSecurityItem(this, lNode);
                lSec.DataSource = aDataSource;
                lSec.UserName = "";
                lSec.Password = "";
                lSec.Authorize = false;
                lSec.PostSettings();

            }
            else
            {
                XmlNode lReportSecurity = XmlTools.CreateXmlNode(_SecurityDoc, XML_REPORTSEC, _SecRoot);

                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_AUTH, "no");
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_FILE, aReportFile);
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_DATASOURCE, aDataSource);
            }

            _SecurityDoc.Save(_SecurityFile);
        }
예제 #4
0
        public void AddDataSourceSecurity(string aDataSource, string aUserID, string aPassword)
        {
            XmlNode lNode = XmlTools.getXmlNodeByAttrVal(XML_DSSEC, XMLa_DATASOURCE, aDataSource, _SecRoot);

            if (lNode != null)
            {
                CReportSecurityItem lSec = new CReportSecurityItem(this, lNode);
                lSec.DataSource = aDataSource;
                lSec.UserName = aUserID;
                lSec.Password = aPassword;
                lSec.Authorize = true;
                lSec.PostSettings();

            }
            else
            {
                XmlNode lReportSecurity = XmlTools.CreateXmlNode(_SecurityDoc, XML_DSSEC, _SecRoot);

                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_AUTH, "yes");
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_DATASOURCE, aDataSource);
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_USERID, aUserID);
                XmlTools.AddNewAttr(_SecurityDoc, lReportSecurity, XMLa_PASSWORD, aPassword);

                _SecurityDoc.Save(_SecurityFile);
            }
        }