private Cheque validaCheque() { bool band,exito; Cheque ch = new Cheque(); exito=true; if (!validaProveedor()) exito = false; else { band = ch.setCantidad(textBoxCantidad.Text.Trim()); if (!band) exito = band; ch.setDate(dateTimePicker1.Value); ch.setEsPagare(checkBoxPoliza.Checked); band = ch.setFactura(textBoxFactura.Text.Trim()); if (!band) exito = band; ch.setLeyenda(checkBoxLeyenda.Checked); ch.setNombre(textBoxOrdenDe.Text.Trim()); ch.setConcepto(textBoxConcepto.Text.Trim()); } if (!exito) return null; return ch; }