public NewsNodeCreator(NewsPageParameter parameter, NewsConfigurationSection config, NewsDataAccess DAL, XmlDocument document)
 {
     Parameter = parameter;
     Config = config;
     dal = DAL;
     xdoc = document;
 }
 public NewsPublishHandler(string Url)
 {
     config = (NewsConfigurationSection)ConfigurationManager.GetSection("publish/newsPublish");
     Logger = LogManager.GetLogger(config.Logger);
     dal = new NewsDataAccess(config);
     PageParameter = GetParameter(Url);
     PageFileName = GetPageFileName();
 }
        public PageCreatorNewsDetail(NewsPageParameter parameter, NewsConfigurationSection config)
        {
            Parameter = parameter;
            Config = config;
            CreatorElement = config.PageCreators["detail"];

            Logger = LogManager.GetLogger(config.Logger);
            dal = new NewsDataAccess(config);
        }
        public PageCreator GetPageCreator(NewsPageParameter Parameter, NewsConfigurationSection config)
        {
            PageCreator creator = null;

            switch (Parameter.PageType)
            {
                case 1:
                    creator = (PageCreator)new PageCreatorNewsList(Parameter, config);
                    break;
                case 2:
                    creator = (PageCreator)new PageCreatorNewsDetail(Parameter, config);
                    break;
            }

            return creator;
        }
 public NewsDataAccess(NewsConfigurationSection config)
 {
     Config = config;
     db = DatabaseFactory.CreateDatabase(config.Database);
 }