Example #1
0
 public PageService(IPageData pageData, ISettingData settingData, LoggingService log, IUserData userData,
                    IAtomicCmsDataRepository dataContext)
 {
     this.pageData = pageData;
     this.settingData = settingData;
     this.log = log;
     this.userData = userData;
     _dataContext = dataContext;
 }
        public IContent WritePage(ISource source, IPageData pageData, OutputData outputData)
        {
            //DataSet ds = outputData.Data as DataSet;
            //TkDebug.AssertArgumentNull(ds, "ds", null);
            //DataTable table = ds.Tables[fMetaData.Table.TableName];

            byte[] midArray = NPOIWrite.ExportExcel(outputData, this);
            string fileName = fMetaData.Table.TableDesc + ".xls";
            FileContent file = new FileContent(NetUtil.GetContentType(fileName), fileName, midArray);
            return new WebFileContent(file);
        }
        /// <summary>
        /// Builds a handler for the specified request and page data.
        /// </summary>
        /// <param name="requestContext">The request context.</param>
        /// <param name="pageData">The page data.</param>
        /// <returns>The handelr.</returns>
        protected override IHttpHandler BuildHandler(RequestContext requestContext, IPageData pageData)
        {
            var handler = base.BuildHandler(requestContext, pageData);
            new PageInitializer().Initialize(handler);

            var page = handler.GetPageHandler();
            if (page != null)
            {
                page.Init += this.MvcPageEditorRouteHandlerInit;
            }

            return handler;
        }
Example #4
0
 public WebPageInfo(IPageData pageData, SessionGlobal sessionGbl, Uri retUrl, Uri selfUrl)
 {
     Url         = new UrlInfo(retUrl, selfUrl);
     Info        = new PageInfo(pageData, sessionGbl);
     QueryString = pageData.QueryString.ToDictionary();
 }
        public IPageMaker CreateObject(params object[] args)
        {
            IPageData pageData = ObjectUtil.ConfirmQueryObject <IPageData>(this, args);

            return(new RazorPageTemplatePageMaker(this, pageData));
        }
Example #6
0
 public override bool IsSupportLogOn(IPageData pageData)
 {
     return(false);
 }
 public PageEntity(PageEntity <TPage> entity)
 {
     this.Page = entity.Page;
     this.Data = entity.Data;
 }
 internal RazorPageTemplatePageMaker(string pageTemplateName,
                                     BaseRazorPageTemplatePageMakerConfig config, IPageData pageData)
     : this(pageTemplateName, config.RetUrl, pageData)
 {
     SetConfig(config);
 }
Example #9
0
 public override IPageMaker CreatePageMaker(IPageData pageData)
 {
     return(new JsonDataSetPageMaker(this));
 }
Example #10
0
 protected abstract IEnumerable <HtmlNode> GetFiles(IPageData pageData, Uri url);
 public RazorPageTemplatePageMaker(string pageTemplateName, IPageData pageData)
     : this(pageTemplateName, (RetUrlConfig)null, pageData)
 {
 }
Example #12
0
 public override ISource CreateSource(IPageData pageData)
 {
     return(PlugInFactoryManager.CreateInstance <ISource>(
                SourcePlugInFactory.REG_NAME, "ShowException"));
 }
Example #13
0
 public override IPageMaker CreatePageMaker(IPageData pageData)
 {
     return(new FreeRazorPageMaker(FILE_NAME));
 }
Example #14
0
 public abstract AnalyzeResult Analyse(IPageData pageData);
Example #15
0
 public MainPagePageMaker(IPageData pageData)
     : base(pageData)
 {
     Initialize(pageData);
 }
Example #16
0
 public override IRedirector CreateRedirector(IPageData pageData)
 {
     return(OutputRedirector.Redirector);
 }
 public override IPageMaker CreatePageMaker(IPageData pageData)
 {
     return(new FilePageMaker(this));
 }
Example #18
0
 public abstract void Analyse(IPageData pageData);
Example #19
0
 public override IPostObjectCreator CreatePostObjectCreator(IPageData pageData)
 {
     return(null);
 }
Example #20
0
 /// <summary>
 /// When overriden in a derived class, this gets the value of the Property for a given Page
 /// </summary>
 /// <param name="page">Page for the View Model</param>
 /// <param name="propertyType">Actual return type for the Property</param>
 /// <param name="factory">View Model factory</param>
 /// <returns>The Property value</returns>
 public abstract object GetPropertyValues(IPageData page, Type propertyType, IViewModelFactory factory);
        internal RazorPageTemplatePageMaker(string pageTemplateName, RetUrlConfig config, IPageData pageData)
        {
            TkDebug.AssertArgumentNullOrEmpty(pageTemplateName, "pageTemplateName", null);

            PageTemplateName = pageTemplateName;
            fPageInfo        = new WebPageInfo(pageData, WebGlobalVariable.SessionGbl,
                                               RetUrlConfig.GetRetUrl(config, pageData), pageData.PageUrl);
        }
Example #22
0
 public override IPageMaker CreatePageMaker(IPageData pageData)
 {
     return(new JsonObjectPageMaker());
 }
 internal RazorPageTemplatePageMaker(RazorPageTemplatePageMakerConfig config, IPageData pageData)
     : this(config.PageTemplate, config, pageData)
 {
 }
Example #24
0
 public override ISource CreateSource(IPageData pageData)
 {
     return(new UploadSource());
 }
Example #25
0
 public override ISource CreateSource(IPageData pageData)
 {
     return(new PlugInSource());
 }
Example #26
0
 public override IPostObjectCreator CreatePostObjectCreator(IPageData pageData)
 {
     return(XmlPostDataSetCreator.Creator);
 }
 public PageEntity(TPage page, IPageData data)
 {
     this.Page = page;
     this.Data = data;
 }
Example #28
0
 public override IPageMaker CreatePageMaker(IPageData pageData)
 {
     return(string.IsNullOrEmpty(ContentType) ? new SourceOutputPageMaker()
         : new SourceOutputPageMaker(ContentType));
 }
 public SyndicationService(IPageData pageData, ISettingData settingData)
 {
     this.pageData = pageData;
     this.settingData = settingData;
 }
Example #30
0
 public override IRedirector CreateRedirector(IPageData pageData)
 {
     return(RetUrlRedirector.Redirector);
 }
Example #31
0
 public SyndicationService(IPageData pageData, ISettingData settingData)
 {
     this.pageData    = pageData;
     this.settingData = settingData;
 }
Example #32
0
 public InternalCallerInfo(IPageData pageData, SessionGlobal sessionGbl, Uri retUrl, Uri selfUrl)
 {
     fPageInfo = new WebPageInfo(pageData, sessionGbl, retUrl, selfUrl);
 }