private void button1_Click(object sender, EventArgs e)
 {
     if (frmbodega == null)
     {
         frmbodega             = new FormBodega();
         frmbodega.FormClosed += new FormClosedEventHandler(frmeditarbodega_FormClosed);//para actualizar datos al cerrar formulario
         frmbodega.ShowDialog();
     }
     else
     {
         frmbodega.Activate();
     }
 }
 private void formBodega_FormClosed(object sender, EventArgs e)
 {
     formBodega = null;
 }