コード例 #1
0
        public ActionResult EditCafeComment(int ID)
        {
            Model model = new Model();

            try
            {
                CafeComment cafeComment = model.SELECTCafeComment_WHEREID(ID);
                if (cafeComment != null)
                {
                    return(View(cafeComment));
                }
                else
                {
                    model.Close();
                    return(RedirectToAction("Error", "Admin"));
                }
            }
            catch (Exception)
            {
                model.Close();
                return(RedirectToAction("Error", "Admin"));
            }
        }
コード例 #2
0
        public ActionResult UpdateCafeComment(CafeComment cafeComment)
        {
            int errorCode = InputControl.UpdateCafeCommentControl(cafeComment);

            return(Json(new { result = errorCode }));
        }
コード例 #3
0
ファイル: Model.cs プロジェクト: OsmanCayir/netgarson
 public void UPDATECafeComment_WHEREID(CafeComment cafeComment)
 {
     connection.Execute("UPDATE netgarson.dbo.[CafeComment] SET CommentText = @CommentText, Plus = @Plus, Cons = @Cons, IsNew = @IsNew, Active = @Active, User_ID = @User_ID WHERE ID = @ID", new { cafeComment.CommentText, cafeComment.Plus, cafeComment.Cons, cafeComment.IsNew, cafeComment.Active, cafeComment.User_ID, cafeComment.ID });
 }
コード例 #4
0
ファイル: Model.cs プロジェクト: OsmanCayir/netgarson
 public void INSERTCafeComment(CafeComment cafeComment)
 {
     connection.Execute("INSERT INTO netgarson.dbo.[CafeComment]([CommentText], [Plus], [Cons], [RecordDate], [IsNew], [Active], [User_ID]) VALUES (@CommentText, @Plus, @Cons, @RecordDate, @IsNew, @Active, @User_ID)", new { cafeComment.CommentText, cafeComment.Plus, cafeComment.Cons, cafeComment.RecordDate, cafeComment.IsNew, cafeComment.Active, cafeComment.User_ID });
 }