/// <summary> /// 根据审核历史信息ID获取审核历史信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public ProcessHistory GetArticleProcessHistory(string articleID, string historyID) { Article article = ArticleHelper.GetArticle(articleID); List <ProcessHistory> list = StrToList(article.FlowXml); MyListHelper listHelper = new MyListHelper(); listHelper.HistoryID = historyID; ProcessHistory aph = list.Find(listHelper.MatchByID); return(aph); }
/// <summary> /// 通过文章ID获取审核进程信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public Processing GetArticleProcess(string id) { Article a = ArticleHelper.GetArticle(id); if (a != null) { return(GetArticleProcess(a)); } else { return(null); } }
/// <summary> /// 根据ID判断是否有审核记录 /// </summary> /// <param name="id"></param> /// <returns></returns> public bool IsExistProcess(string id) { Article a = ArticleHelper.GetArticle(id); if (a != null) { return((ArticleStates)a.State == ArticleStates.Checking); } else { return(false); } }
/// <summary> /// 格式化标题 /// </summary> /// <param name="titleFormat">标题格式</param> /// <param name="channelID">栏目ID</param> /// <param name="articleID">文章ID</param> /// <returns></returns> private string ParselFormatTitle(string titleFormat, string channelID, string articleID) { string channelParam = "{$ChannelName}"; string articleParam = "{$ArticleTitle}"; if (titleFormat.IndexOf(channelParam) > -1) { string chName = ChannelHelper.GetChannelName(channelID); titleFormat = titleFormat.Replace(channelParam, chName); } if (titleFormat.IndexOf(articleParam) > -1 && articleID != "") { string title = ""; try { Article ar = ArticleHelper.GetArticle(articleID, null); if (ar != null) { if (ar.Title != null) { title = ar.Title; } else { title = "详细页"; } } else { title = "详细页"; } } catch (Exception ex) { We7.Framework.LogHelper.WriteLog(typeof(FrontBasePage), ex); } titleFormat = titleFormat.Replace(articleParam, title); } return(titleFormat); }
public void InsertArticleProcessHistory(ProcessHistory aph, string articleID) { Article a = ArticleHelper.GetArticle(articleID); InsertArticleProcessHistory(aph, a); }