/// <summary> /// Creates the model. /// </summary> /// <param name="pages">The pages.</param> /// <param name="request">The request.</param> /// <param name="count">The count.</param> /// <param name="categoriesFuture">The categories future.</param> /// <returns>Model</returns> protected override PagesGridViewModel <SiteSettingPageViewModel> CreateModel(System.Collections.Generic.IEnumerable <SiteSettingPageViewModel> pages, PagesFilter request, NHibernate.IFutureValue <int> count, System.Collections.Generic.IEnumerable <Root.Models.LookupKeyValue> categoriesFuture) { return(new UntranslatedPagesGridViewModel <SiteSettingPageViewModel>( pages.ToList(), request as UntranslatedPagesFilter, count.Value, categoriesFuture.ToList())); }
/// <summary> /// Creates the model. /// </summary> /// <param name="pages">The pages.</param> /// <param name="request">The request.</param> /// <param name="count">The count.</param> /// <param name="categoriesFuture">The categories future.</param> /// <param name="layouts">The layouts.</param> /// <returns> /// Model /// </returns> protected override PagesGridViewModel <SiteSettingPageViewModel> CreateModel(System.Collections.Generic.IEnumerable <SiteSettingPageViewModel> pages, PagesFilter request, NHibernate.IFutureValue <int> count, System.Collections.Generic.IList <LookupKeyValue> layouts) { return(new UntranslatedPagesGridViewModel <SiteSettingPageViewModel>( pages.ToList(), request as UntranslatedPagesFilter, count.Value) { Layouts = layouts }); }
/// <summary> /// Creates the model. /// </summary> /// <param name="pages">The pages.</param> /// <param name="request">The request.</param> /// <param name="count">The count.</param> /// <param name="categoriesFuture">The categories future.</param> /// <param name="layouts">The layouts.</param> /// <param name="categoriesLookupList">The categories.</param> /// <returns> /// Model /// </returns> protected override PagesGridViewModel <SiteSettingPageViewModel> CreateModel(System.Collections.Generic.IEnumerable <PageProperties> pages, PagesFilter request, NHibernate.IFutureValue <int> count, System.Collections.Generic.IList <LookupKeyValue> layouts, System.Collections.Generic.IList <CategoryLookupModel> categoriesLookupList) { var pagesList = new List <SiteSettingPageViewModel>(); foreach (var page in pages) { var model = new SiteSettingPageViewModel(); model.Id = page.Id; model.Version = page.Version; model.Title = page.Title; model.PageStatus = page.Status; model.CreatedOn = page.CreatedOn.ToFormattedDateString(); model.ModifiedOn = page.ModifiedOn.ToFormattedDateString(); model.PageUrl = page.PageUrl; model.IsMasterPage = page.IsMasterPage; model.LanguageId = page.Language != null ? page.Language.Id : Guid.Empty; pagesList.Add(model); } return(new UntranslatedPagesGridViewModel <SiteSettingPageViewModel>( pagesList, request as UntranslatedPagesFilter, count.Value) { Layouts = layouts, CategoriesLookupList = categoriesLookupList }); }