private void cmdAgregar_Click(object sender, EventArgs e)
        {
            FrmEDDocumentos frm = new FrmEDDocumentos();

            frm.modo = "C";
            frm.conn = conn;
            frm.ShowDialog();
        }
 private void dgvResultados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (modo != "user")
     {
         DataGridViewRow row = this.dgvResultados.SelectedRows[0];
         FrmEDDocumentos frm = new FrmEDDocumentos();
         frm.Num_Documento    = row.Cells[0].Value.ToString();
         frm.Num_Factura      = row.Cells[1].Value.ToString();
         frm.concepto_pago    = row.Cells[2].Value.ToString();
         frm.Fecha_Documento  = row.Cells[3].Value.ToString();
         frm.Monto            = row.Cells[4].Value.ToString();
         frm.Fecha_Registro   = row.Cells[5].Value.ToString();
         frm.nombre_proveedor = row.Cells[6].Value.ToString();
         frm.Estado           = row.Cells[7].Value.ToString();
         frm.modo             = "U";
         frm.conn             = conn;
         frm.ShowDialog();
     }
 }