public bool EvaluarSiHayRegistrosEnLaTablaTMP() { try { if (dgvLista.Rows.Count == 0) { MessageBox.Show("Se debe seleccionar un elementos en la lista de registros"); return(true); } TransaccionTMPEN oRegistroEN = new TransaccionTMPEN(); TransaccionTMPLN oRegistroLN = new TransaccionTMPLN(); DateTime Desde = Convert.ToDateTime(dgvLista.CurrentRow.Cells["Desde"].Value); DateTime Hasta = Convert.ToDateTime(dgvLista.CurrentRow.Cells["Hasta"].Value); if (oRegistroLN.EvaluarSiHayDatosEnLaTablaTMP(oRegistroEN, Program.oDatosDeConexion, Desde, Hasta)) { throw new ArgumentException(oRegistroLN.Error); } else { return(false); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Evaluar si hay registro pendiente en proceso", MessageBoxButtons.OK, MessageBoxIcon.Error); return(true); } }
public bool EvaluarSiHayRegistrosEnLaTablaTMP() { try { TransaccionTMPEN oRegistroEN = new TransaccionTMPEN(); TransaccionTMPLN oRegistroLN = new TransaccionTMPLN(); if (oRegistroLN.EvaluarSiHayDatosEnLaTablaTMP(oRegistroEN, Program.oDatosDeConexion, dtpDesde.Value, dtpHasta.Value)) { throw new ArgumentException(oRegistroLN.Error); } else { return(false); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Evaluar si hay registro pendiente en proceso", MessageBoxButtons.OK, MessageBoxIcon.Error); return(true); } }