private void button5_Click(object sender, EventArgs e)
        {
            VentanaDoctores mov = new VentanaDoctores();

            mov.MdiParent = this.MdiParent;

            int    cod1;
            string MyConnection3 = "Driver ={ MySQL ODBC 3.51 Driver }; Dsn=servidor_seguridad; UID=root; PWD = ;  ";

            string         Query2     = "Select id_doc from doctores order by id_doc DESC LIMIT 1;";
            OdbcConnection MyConn3    = new OdbcConnection(MyConnection3);
            OdbcCommand    MyCommand3 = new OdbcCommand(Query2, MyConn3);

            MyConn3.Open();
            OdbcDataReader myreader3;

            myreader3 = MyCommand3.ExecuteReader();
            if (myreader3.Read())
            {
                cod1 = (int)myreader3["id_doc"];
                int cod2 = cod1 + 1;

                mov.primarykey.Text = cod2.ToString();
            }
            mov.Show();
        }
        private void Dgv_trans_prov_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            VentanaDoctores mov = new VentanaDoctores();

            mov.primarykey.Text = Dgv_trans_prov.CurrentRow.Cells[0].Value.ToString();
            mov.textBox2.Text   = Dgv_trans_prov.CurrentRow.Cells[1].Value.ToString();
            mov.textBox3.Text   = Dgv_trans_prov.CurrentRow.Cells[2].Value.ToString();
            mov.textBox4.Text   = Dgv_trans_prov.CurrentRow.Cells[3].Value.ToString();
            mov.textBox5.Text   = Dgv_trans_prov.CurrentRow.Cells[4].Value.ToString();
            mov.textBox6.Text   = Dgv_trans_prov.CurrentRow.Cells[5].Value.ToString();
            mov.textBox7.Text   = Dgv_trans_prov.CurrentRow.Cells[6].Value.ToString();

            mov.Show();
        }