Пример #1
0
 public void imprimir(Cheque cheque)
 {
     formatoCheque = conf.getFormatoChequeActivo();
     {
         if (formatoCheque != null)
         {
             tipo = "Cheque";
             ch = cheque;
             if (printDialog1.ShowDialog() == DialogResult.OK)
             {
                 printDocument1.DocumentName = "Imprimiendo Cheque";
                 printDocument1.PrinterSettings.PrinterName = printDialog1.PrinterSettings.PrinterName;
                 printDocument1.Print();
             }
         }
         else
         {
             MessageBox.Show("No cuentas con una configuracion seleccionada", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
Пример #2
0
        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;
        }