Пример #1
0
        public void ImgTopic()
        {
            DataPage <ForumPickedImg> list = ForumPickedImg.findPage("AppId=" + ctx.app.Id);

            IBlock block = getBlock("list");

            foreach (ForumPickedImg f in list.Results)
            {
                block.Set("f.Id", f.Id);
                block.Set("f.Title", f.Title);
                block.Set("f.Url", f.Url);
                block.Set("f.ImgUrl", f.ImgUrl);
                block.Set("f.Created", f.Created);
                block.Next();
            }
            set("page", list.PageBar);
        }
        public void Index()
        {
            set("addUrl", to(Add));
            DataPage <ForumPickedImg> list = ForumPickedImg.findPage("AppId=" + ctx.app.Id);

            IBlock block = getBlock("list");

            foreach (ForumPickedImg f in list.Results)
            {
                block.Set("f.Id", f.Id);
                block.Set("f.Title", f.Title);
                block.Set("f.Url", f.Url);
                block.Set("f.ImgUrl", f.ImgUrl);
                block.Set("f.Created", f.Created);
                block.Set("f.EditLink", to(Edit, f.Id));
                block.Set("f.DeleteLink", to(Delete, f.Id));
                block.Next();
            }
            set("page", list.PageBar);
        }