示例#1
0
        /// <summary>
        /// get an AttributeMaster instance object and set default value to that object
        /// </summary>
        /// <returns></returns>
        private void InitailAttributesMaster()
        {
            AttributesMaster amst = new AttributesMaster();

            AttributesXmlDownloader axd = new AttributesXmlDownloader(apiContext);
            amst.XmlProvider = axd;

            AttributesXslDownloader asd = new AttributesXslDownloader(apiContext);
            amst.XslProvider = asd;

            CategoryCSDownloader ctd = new CategoryCSDownloader(apiContext);
            amst.CategoryCSProvider = ctd;

            this.attrMaster = amst;
        }
示例#2
0
        /// <summary>
        /// get an AttributeMaster instance object and set default value to that object
        /// </summary>
        /// <returns></returns>
        private AttributesMaster initailAttributesMaster(ApiContext context)
        {
            AttributesMaster amst = new AttributesMaster();
            // Set common site for all calls.
            context.Site = (SiteCodeType)Session[Global.SITE];
            //asn.ApiCallCommon.SiteId = (SiteCodeType)Session[Global.SITE];

            AttributesXmlDownloader axd = new AttributesXmlDownloader(context);
            amst.XmlProvider = axd;

            AttributesXslDownloader asd = new AttributesXslDownloader(context);
            amst.XslProvider = asd;

            CategoryCSDownloader ctd = new CategoryCSDownloader(context);
            amst.CategoryCSProvider = ctd;

            Session[Global.ATTRIBUTES_MASTER] = amst;
            return amst;
        }