public override ActionResult Index(RenderModel model)
        {
            ChequesList chequeList             = model.As <ChequesList>();
            RenderPage <ChequesList> viewModel = new RenderPage <ChequesList>(chequeList);

            return(this.CurrentTemplate(viewModel));
        }
        /// <inheritdoc />
        public override ActionResult Index(RenderModel model)
        {
            var page = model.As <Home>();
            RenderPage <Home> viewModel = new RenderPage <Home>(page);

            return(this.CurrentTemplate(viewModel));
        }
        public virtual ActionResult Index(RenderModel model)
        {
            Page page = model.As <Page>();
            IRenderPage <Page> render = new RenderPage <Page>(page);

            return(this.CurrentTemplate(render));
        }
示例#4
0
        /// <inheritdoc />
        public override ActionResult Index(RenderModel model)
        {
            Generic generic = model.As <Generic>();
            RenderPage <Generic> viewModel = new RenderPage <Generic>(generic);

            return(this.CurrentTemplate(viewModel));
        }
        /// <summary>
        /// The home.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult Home(RenderModel model)
        {
            var home = model.As <Home>();

            var viewModel = new RenderPageBase <Home>(home);

            return(this.View("~/Views/Home.cshtml", viewModel));
        }
        /// <summary>
        /// Returns the default result of an action method for the controller used to perform a framework-level
        /// operation on behalf of the action method.
        /// <remarks>The resultant view will always match the name of the document type.</remarks>
        /// </summary>
        /// <param name="model">The model to provide the result for.</param>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public override ActionResult Index(RenderModel model)
        {
            SubPage page = model.As <SubPage>();

            RenderSubPage viewModel = new RenderSubPage(page);

            return(this.View("SubPage", viewModel));
        }
示例#7
0
        public ActionResult Index(RenderModel model)
        {
            var home = model.As <Homepage>();

            home.ControllerAction = _sandboxConfig.CacheEnabled.ToString();

            return(CurrentView(home));
        }
        /// <summary>
        /// The home.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult Home(RenderModel model)
        {
            var home = model.As<Home>();

            var viewModel = new RenderPageBase<Home>(home);

            return this.View("~/Views/Home.cshtml", viewModel);
        }
        public override ActionResult Index(RenderModel model)
        {
            var page = model.As <Cheques>();
            RenderPage <Cheques> viewModel = new RenderPage <Cheques>(page);

            viewModel.Content.Listing = model.Content.Children.OrderBy("chequeDate desc").As <Cheque>();

            return(this.CurrentTemplate(viewModel));
        }
示例#10
0
        /// <summary>
        /// Renders the Event page
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public override ActionResult Index(RenderModel model)
        {
            var typedModel = model.As <EventDetail>();

            if (ratingsService != null)
            {
                typedModel.EventRating = ratingsService.GetRating(typedModel.Id);
            }
            return(CurrentTemplate(typedModel));
        }
示例#11
0
        /// <summary>
        /// Returns the default result of an action method for the controller used to perform a framework-level
        /// operation on behalf of the action method.
        /// <remarks>The resultant view will always match the name of the document type.</remarks>
        /// </summary>
        /// <param name="model">The model to provide the result for.</param>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public override ActionResult Index(RenderModel model)
        {
            Home home = model.As <Home>();

            RenderHome viewModel = new RenderHome(home)
            {
                SubPages = ContentHelper.Instance.GetChildren <SubPage>(home.Id).ToList()
            };

            return(this.View("Home", viewModel));
        }
        public ActionResult HomePage(RenderModel model, [FromUri] int offset = 0)
        {
            var contexts = new[] {
                new AddNumberProcessorContext()
                {
                    Number = offset
                }
            };


            return(View(model.As <HomePageViewModel>(processorContexts: contexts)));
        }
示例#13
0
        public ActionResult SettingsMap(RenderModel model)
        {
            if (model == null)
            {
                return(new HttpNotFoundResult());
            }

            var publishedContent = model.As <SettingsMapItem>();

            var result = JsonResultHelper.GetJsonResult(publishedContent);

            return(result);
        }
示例#14
0
        public ActionResult OccasionsMap(RenderModel model)
        {
            if (model == null)
            {
                return(new HttpNotFoundResult());
            }

            var publishedContent = model.As <IPublishedContent>();

            var content = GetOccasionsMap(publishedContent);

            var result = JsonResultHelper.GetJsonResult(content);

            return(result);
        }
示例#15
0
        public ActionResult LayoutsMap(RenderModel model)
        {
            if (model == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.NotFound));
            }

            var publishedContent = model.As <IPublishedContent>();

            var content = GetLayoutsMap(publishedContent);

            var result = JsonResultHelper.GetJsonResult(content);

            return(result);
        }
示例#16
0
        public ActionResult ChequeDetail(RenderModel model, string contentId)
        {
            var         parent     = model.Content.Parent;
            ChequesList chequeList = parent.As <ChequesList>();
            var         list       = ContentHelper.GetById <ChequesList>(parent.Id);

            var chqDtl = list.ListOfCheques.FirstOrDefault(c => c.Name.Equals(contentId, System.StringComparison.InvariantCultureIgnoreCase));

            ChequeDetail chequeDtl = model.As <ChequeDetail>();

            chequeDtl.ChequeDtl = chqDtl;

            RenderPage <ChequeDetail> viewModel = new RenderPage <ChequeDetail>(chequeDtl);

            return(this.CurrentTemplate(viewModel));
        }
示例#17
0
        public ActionResult PagesMap(RenderModel model)
        {
            if (model == null)
            {
                return(new HttpNotFoundResult());
            }

            var publishedContent = model.As <IPublishedContent>();

            var checkoutPages = !string.IsNullOrWhiteSpace(Request.QueryString["checkout"]);

            var content = GetPagesMap(publishedContent, checkoutPages);

            var result = JsonResultHelper.GetJsonResult(content);

            return(result);
        }
示例#18
0
        public override ActionResult Index(RenderModel model)
        {
            if (model == null)
            {
                return(new HttpNotFoundResult());
            }

            var content = model.As <Layout>();

            if (content.DocumentTypeAlias != "layout")
            {
                return(new HttpNotFoundResult());
            }

            var result = JsonResultHelper.GetJsonResult(content);

            return(result);
        }
        public override ActionResult Index(RenderModel model)
        {
            if (model == null)
            {
                return(new HttpNotFoundResult());
            }

            var publishedContent = model.As <IPublishedContent>();

            var content = ResolveComponentContent(publishedContent);

            if (content == null)
            {
                return(new HttpNotFoundResult());
            }

            var result = JsonResultHelper.GetJsonResult(content);

            return(result);
        }
示例#20
0
        public override ActionResult Index(RenderModel model)
        {
            Error404 page = model.As <Error404>();

            return(this.View("Error404", page));
        }
示例#21
0
        public override ActionResult Index(RenderModel model)
        {
            Home page = model.As <Home>();

            return(this.View("Home", page));
        }
示例#22
0
        public override ActionResult Index(RenderModel model)
        {
            GenericPage page = model.As <GenericPage>();

            return(this.View("GenericPage", page));
        }
示例#23
0
        public override ActionResult Index(RenderModel model)
        {
            Search page = model.As <Search>();

            return(this.View("Search", page));
        }