Exemple #1
0
 public ActionResult News(int page = 1)
 {
     return(View(new ListDetailArticleModel(PagingHelper.TakePage(ArticleService.GetList(Thread.CurrentThread.CurrentUICulture).Select(a => new DetailArticleModel
     {
         Title = a.Title,
         Content = a.Content,
         Modified = a.Modified,
         AuthorFullname = a.Author.Fullname
     }), page, PageSize),
                                            PagingHelper.CreateInfo(ArticleService.GetList(Thread.CurrentThread.CurrentUICulture), page, PageSize)
                                            )));
 }
Exemple #2
0
 public ActionResult Index(int page = 1)
 {
     return(View(new PageableModel <ListArticleModel>(PagingHelper.TakePage(ArticleService.GetList().Select(a => new ListArticleModel
     {
         ID = a.ID,
         Title = a.Title,
         Culture = a.Culture,
         Modified = a.Modified,
         AuthorFullname = a.Author.Fullname
     }), page, PageSize),
                                                      PagingHelper.CreateInfo(ArticleService.GetList(), page, PageSize)
                                                      )));
 }
Exemple #3
0
 public ActionResult List(int page = 1)
 {
     return(View(new PageableModel <ListUserAccount>(PagingHelper.TakePage(UserService.GetList().Select(u => new ListUserAccount
     {
         ID = u.ID,
         PublicIdentifier = u.PublicIdentifier,
         Fullname = u.Fullname,
         LocalUsername = u.LocalCredentials.Username,
         RemoteUsername = u.RemoteCredentials.Username,
         Enabled = u.Enabled,
         Created = u.Created,
         UserRole = u.UserRole
     }), page, BaseController.PageSize),
                                                     PagingHelper.CreateInfo(UserService.GetList(), page, BaseController.PageSize)
                                                     )));
 }
Exemple #4
0
        public ActionResult FormData(int formDefinitionID, int page = 1)
        {
            FormDefinition form = FormService.Get(formDefinitionID);

            return(View(new ListFormDataModel
            {
                ProjectID = form.ProjectID,
                FormName = form.Name,
                Columns = FormService.GetFields(formDefinitionID).Select(f => new SimpleColumn
                {
                    ID = f.ID,
                    Name = f.Name
                }).ToList(),
                Items = PagingHelper.TakePage(DataService.GetList(formDefinitionID).Select(d => new ListItemFormDataModel
                {
                    ID = d.ID,
                    Created = d.Created,
                    Columns = d.Fields
                }), page, PageSize),
                PagingInfo = PagingHelper.CreateInfo(DataService.GetList(formDefinitionID), page, PageSize)
            }));
        }