Exemple #1
0
        private void создатьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            NewPostForm form = new NewPostForm();

            if (form.ShowDialog() == DialogResult.OK)
            {
                UpdateGrid();
            }
        }
Exemple #2
0
        private void редактироватьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                Post post = dataGridView1.SelectedRows[0].DataBoundItem as Post;

                NewPostForm form = new NewPostForm(post);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    UpdateGrid();
                }
            }
        }