public bool UpdateBoard_Md(board_Tb BoardInfo) { board_Tb objItem = db.board_Tb.FirstOrDefault(m => m.id == BoardInfo.id && m.theme_board_id == 0); objItem.board_name = BoardInfo.board_name.ToString(); return(db.SaveChanges() > 0); }
public bool UpdateArticle_Md(article_Tb articleItem) { article_Tb objItem = db.article_Tb.FirstOrDefault(m => m.arti_id == articleItem.arti_id); objItem.title = articleItem.title.ToString(); objItem.arti_update = DateTime.Now; objItem.arti_txt = articleItem.arti_txt.ToString(); objItem.arti_theme = int.Parse(articleItem.arti_theme.ToString()); //更換文章區塊 return(db.SaveChanges() > 0); }