public virtual void Edit(long id) { target(Update, id); SpiderArticle article = SpiderArticle.findById(id); bind("data", article); }
public void Edit(int id) { target(Update, id); SpiderArticle article = SpiderArticle.findById(id); bind("data", article); }
public virtual void Show(long id) { SpiderArticle post = SpiderArticle.findById(id); bind("post", post); set("refreshPageLink", to(DoRefresh, id)); set("editLink", to(Edit, id)); }
public virtual void Update(long id) { SpiderArticle article = SpiderArticle.findById(id); article = ctx.PostValue(article) as SpiderArticle; article.update(); echoRedirect(lang("opok"), to(Show, id)); }
public void Edit(int id) { target(Update, id); SpiderArticle article = SpiderArticle.findById(id); bind("data", article); editor("spiderArticle.Body", article.Body, "480px"); }
public virtual void DoRefresh(long id) { SpiderArticle post = SpiderArticle.findById(id); StringBuilder log = new StringBuilder(); String content = new PagedDetailSpider().GetContent(post.Url, post.SpiderTemplate, log); if (strUtil.HasText(content)) { post.Body = content; post.update("Body"); echoJsonMsg("刷新成功", true, ""); } else { errors.Add(log.ToString().Replace(Environment.NewLine, "").Trim()); echoError(); } }