void dgvDatos_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex < 0) return;
     if (e.ColumnIndex == dgvDatos.Columns["Editar"].Index)
     {
         int PK = Convert.ToInt32(dgvDatos.CurrentRow.Cells["IdFondoFONP"].Value.ToString());
         frmFondoCaja frm = new frmFondoCaja(dt.Tables[0], PK);
         frm.fecha = Convert.ToDateTime(dgvDatos.CurrentRow.Cells["FechaFONP"].Value.ToString());
         frm.idPc = Convert.ToInt32(dgvDatos.CurrentRow.Cells["IdPcFONP"].Value.ToString());
         frm.idLocal = Convert.ToInt32(dgvDatos.CurrentRow.Cells["IdLocalLOC"].Value.ToString());
         frm.ShowDialog();
     }
     if (e.ColumnIndex == dgvDatos.Columns["Borrar"].Index)
     {
         if (MessageBox.Show("¿Desea borrar este registro?", "Buscar",
                 MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             if (!BL.UtilDB.ValidarServicioMysql())
             {
                 MessageBox.Show("NO SE BORRARON LOS DATOS." + '\r' + "No se pudo conectar con el servidor de base de datos."
                         + '\r' + "Consulte al administrador del sistema.", "Trend Sistemas", MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
                 return;
             }
             int PK = Convert.ToInt32(dgvDatos.CurrentRow.Cells["IdFondoFONP"].FormattedValue.ToString());
             string formularioOrigen = "frmFondoCajaCons";
             string accionProgress = "grabar";
             frmProgress progreso = new frmProgress(PK, formularioOrigen, accionProgress, ref bindingSource1);
             progreso.ShowDialog();
         }
     }
 }
 private void fondoDeCajaToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmFondoCaja newMDIChild = new frmFondoCaja();
     newMDIChild.MdiParent = this;
     newMDIChild.Show();
 }