Example #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            ActualizarPost form = new ActualizarPost(null);

            this.Hide();
            form.Show();
        }
Example #2
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int n = e.RowIndex;

            if (n != -1)
            {
                string id          = dataGridView1.Rows[n].Cells[0].Value.ToString();
                string tablaNombre = dataGridView1.Columns[0].HeaderText;

                if (tablaNombre == "idPost")
                {
                    ActualizarPost form = new ActualizarPost(id);
                    this.Hide();
                    form.Show();
                }
                else if (tablaNombre == "idEvento")
                {
                    ActualizarEvento form = new ActualizarEvento(id);
                    this.Hide();
                    form.Show();
                }
                else
                {
                    MessageBox.Show("tabla no seleccionada");
                }
            }
        }