public ActionResult Create(BoardArticles article) { article.Email = "*****@*****.**"; article.BoardIDX = 2000; //1000: 공지사항 게시판 2000:자유게시판 3000:QnA //article.ResisterMemberID = "System"; article.UserName = "******"; article.IPAddress = Commons.GetIpAddress(); article.ViewCnt = 0; article.RegistDate = DateTime.Now; article.RegistUserName = "******"; try { db.BoardArticles.Add(article); db.SaveChanges(); ViewBag.Result = "OK"; } catch (Exception) { ViewBag.Result = "FAIL"; } return(View(article)); }
public ActionResult Create() { BoardArticles article = new BoardArticles(); return(View(article)); }