private void button1_Click(object sender, EventArgs e)
        {
            Admcli ac = new Admcli();

            if (dgv.SelectedRows.Count > 0)
            {
                try
                {
                    ac.txtid.Text     = dgv.CurrentRow.Cells[0].Value.ToString();
                    ac.txtnombre.Text = dgv.CurrentRow.Cells[1].Value.ToString();
                    ac.txtrnc.Text    = dgv.CurrentRow.Cells[2].Value.ToString();
                    ac.txtdirecc.Text = dgv.CurrentRow.Cells[3].Value.ToString();
                    ac.txttel.Text    = dgv.CurrentRow.Cells[4].Value.ToString();



                    ac.MdiParent = MdiParent;
                    ac.Show();
                    this.Close();
                }
                catch (Exception llll)
                {
                    MessageBox.Show("Algo va Mal..." + llll);
                }
            }
            else
            {
                MessageBox.Show("Debe de Seleccionar una Fila", "Atencion!!!", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void button3_Click(object sender, EventArgs e)
        {
            Admcli cli = new Admcli();

            cli.MdiParent = this;
            cli.Show();
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            Admcli lololo = new Admcli();

            lololo.Show();
        }