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

            mov.MdiParent = this.MdiParent;

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

            string         Query2     = "Select id from invequipo order by id 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"];
                int cod2 = cod1 + 1;

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

            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.Show();
        }