Ejemplo n.º 1
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            var showPost = new PostDetails(searchBarInput.Text, _dataConnection);
            //ShowDialog -> posso controllare il valore di ritorno
            DialogResult diagRes = showPost.ShowDialog();

            if (diagRes == DialogResult.OK)
            {
                RefreshData();
            }
        }
Ejemplo n.º 2
0
        private void SearchGridControl_DoubleClick(object sender, EventArgs e)
        {
            Post post = searchGridControl.GetFocusedRow() as Post;

            if (post == null)
            {
                return;
            }

            PostDetails  showPost = new PostDetails(post, _dataConnection);
            DialogResult diagRes  = showPost.ShowDialog();

            if (diagRes == DialogResult.OK)
            {
                RefreshData();
            }
        }