private void btnModificar_Click(object sender, EventArgs e)
 {
     try
     {
         FormularioProveedor prov = new FormularioProveedor();
         prov.idProve   = Convert.ToInt32(dataGridView1.Rows[fila].Cells[0].Value.ToString());
         prov.nombrePro = Convert.ToString(dataGridView1.Rows[fila].Cells[1].Value.ToString());
         prov.rSocial   = Convert.ToString(dataGridView1.Rows[fila].Cells[2].Value.ToString());
         prov.rfc       = Convert.ToString(dataGridView1.Rows[fila].Cells[3].Value.ToString());
         prov.tipo      = Convert.ToString(dataGridView1.Rows[fila].Cells[4].Value.ToString());
         prov.dir       = Convert.ToString(dataGridView1.Rows[fila].Cells[5].Value.ToString());
         prov.tel       = Convert.ToString(dataGridView1.Rows[fila].Cells[6].Value.ToString());
         prov.cel       = Convert.ToString(dataGridView1.Rows[fila].Cells[7].Value.ToString());
         prov.email     = Convert.ToString(dataGridView1.Rows[fila].Cells[8].Value.ToString());
         prov.cont      = 2;
         if (prov.idProve == 0 || prov.idProve == null)
         {
             //MessageBox.Show("Seleccione una fila con datos");
             btnEliminar.Enabled  = false;
             btnModificar.Enabled = false;
         }
         else
         {
             prov.ShowDialog();
             btnEliminar.Enabled  = false;
             btnModificar.Enabled = false;
         }
     }
     catch
     {
     }
 }
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            FormularioProveedor frp = new FormularioProveedor();

            frp.cont = 1;
            frp.ShowDialog();
            btnEliminar.Enabled  = false;
            btnModificar.Enabled = false;
        }