bool CanPlace(int gridX, int gridY) { // 如果这个地方可以下棋子 if (_model == null) { return(false); } return(_model.Get(gridX, gridY) == ChessType.None); }
public IActionResult BoardEdit_Input(uint idx, string title, string contents) { var model = BoardModel.Get(idx); var userSeq = Convert.ToUInt32(User.FindFirstValue(ClaimTypes.NameIdentifier)); if (model.Reg_User != userSeq) { throw new Exception("수정 할수 없습니다"); } model.Title = title; model.Contents = contents; model.Update(); return(Redirect("/home/boardlist")); }
public IActionResult BoardEdit(uint idx, string type) { var model = BoardModel.Get(idx); var userSeq = Convert.ToUInt32(User.FindFirstValue(ClaimTypes.NameIdentifier)); if (model.Reg_User != userSeq) { throw new Exception("수정 할수 없습니다"); } if (type == "U") { return(View(model)); } else if (type == "D") { model.Delete(); return(Redirect("/home/boardlist")); } throw new Exception("잘못된 요청입니다"); }
bool CanPlace(int gridX, int gridY) { // 如果这个地方可以下棋子 return(_model.Get(gridX, gridY) == ChessType.None); }
public IActionResult ContentsView(int seq) //View()는 메소드로 쓸수 없음 route 로 처리 { return(View(BoardModel.Get("GENERAL", seq))); }
bool CanPlace(int gridX, int gridY) { return(_model.Get(gridX, gridY) == ChessType.None); }
public IActionResult BoardView(uint idx) { return(View(BoardModel.Get(idx))); }