Esempio n. 1
0
 public ActionResult TempShow(int id)
 {
     EXArticleTemp article = new EXArticleTemp();
     article = bllSession.IEXArticleTempBLL.GetEntity(id);
     return View(article);
 }
Esempio n. 2
0
 /// <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);
     }
 }