/// <summary> /// 将临时的导入到正式的方法 /// </summary> /// <param name="id"></param> public void TempImportFunc(int id) { EXArticleTemp temp = new EXArticleTemp(); temp = bllSession.IEXArticleTempBLL.GetEntity(id); EXArticle article = new EXArticle(); article = bllSession.IEXArticleBLL.GetEntity(temp.Id); if (article == null) { article = temp; article.Browses = 0; article.CreateBy = CurrentUser.Id; article.CreateDate = DateTime.Now; article.IsDelete = false; article.Status = EXArticleStatus.显示; bool result = bllSession.IEXArticleBLL.Insert(article); temp.Status = EXArticleTempStatus.导入; bllSession.IEXArticleTempBLL.Update(temp); } else { article.Title = temp.Title; article.Description = temp.Description; article.OldBrowses = temp.OldBrowses; article.ModifyBy = CurrentUser.Id; article.ModifyDate = DateTime.Now; article.Label = temp.Label; article.Category = temp.Category; article.Source = temp.Source; article.URL = temp.URL; article.ReplyCount = temp.ReplyCount; bool result = bllSession.IEXArticleBLL.Update(article); temp.Status = EXArticleTempStatus.导入; bllSession.IEXArticleTempBLL.Update(temp); } }
public ActionResult Show(int id) { EXArticle article = new EXArticle(); article = bllSession.IEXArticleBLL.GetEntity(id); return View(article); }