Esempio n. 1
0
        protected void btnWriteComment_Click(object sender, EventArgs e)
        {
            NoteComment comment = new NoteComment();

            comment.BoardId  = Convert.ToInt32(Request["Id"]); //부모글
            comment.Name     = txtName.Text;                   //이름
            comment.Password = txtPassword.Text;               //암호
            comment.Opinion  = txtOpinion.Text;                //댓글

            //데이터 입력
            _repository.AddNoteComment(comment);

            Response.Redirect($"{Request.ServerVariables["SCRIPT_NAME"]}?Id={Request["Id"]}");
        }
Esempio n. 2
0
        protected void btnWriteComment_OnClick(object sender, EventArgs e)
        {
            // 코멘트 객체 생성
            NoteComment comment = new NoteComment();

            comment.BoardId  = Convert.ToInt32(Request["Id"]);
            comment.Name     = txtName.Text;
            comment.Password = txtPassword.Text;
            comment.Opinion  = txtOpinion.Text;

            // 코멘트 입력
            repo.AddNoteComment(comment);
            Response.Redirect($"{Request.ServerVariables["SCRIPT_NAME"]}?Id={Request["Id"]}&ANum={Request["ANum"]}");
        }