예제 #1
0
        private void btnCommentCrudDetails_Click(object sender, EventArgs e)
        {
            int           commentIndex = dgvCommentTable.CurrentCell.RowIndex;
            CommentEntity comment      = AllComments.ElementAt(commentIndex);
            CRUD_Comment  crudComment  = new CRUD_Comment(comment);

            crudComment.makeReadOnly();
            crudComment.Show();
        }
예제 #2
0
        private void btnCommentCrudAdd_Click(object sender, EventArgs e)
        {
            CommentEntity comment     = new CommentEntity();
            CRUD_Comment  crudComment = new CRUD_Comment(comment, login.Id);

            crudComment.ShowDialog();
            if (crudComment.DialogResult == DialogResult.OK)
            {
                AllComments.Add(comment);
                dgvCommentTable.Invalidate();
            }
        }
예제 #3
0
        private void btnCommentCrudEdit_Click(object sender, EventArgs e)
        {
            int           commentIndex = dgvCommentTable.CurrentCell.RowIndex;
            CommentEntity comment      = AllComments.ElementAt(commentIndex);
            CRUD_Comment  crudComment  = new CRUD_Comment(comment);

            crudComment.ShowDialog();

            if (crudComment.DialogResult == DialogResult.OK)
            {
                dgvCommentTable.InvalidateRow(commentIndex);
            }
        }