public frmFactura(int idOrden_p, bool flagVenta_p)
        {
            InitializeComponent();
            factura = new Factura();
            pago = new Pago();
            iva = new Iva();

            this.flagVenta = flagVenta_p;
            if (flagVenta_p)
                this.idVenta = idOrden_p;
            else
                this.idReparacion = idOrden_p;
        }
Exemple #2
0
        public ArrayList getPagosVenta(int idFactura)
        {
            string SQL_p;
            MySqlDataReader Reader;
            ArrayList colPagos = new ArrayList();

            SQL_p = "SELECT * FROM pagosventa WHERE facturaventa_idfactura='" + idFactura + "' ORDER BY pagosventa.numeropago";

            Reader = Conector.consultar(SQL_p);

            while (Reader.Read())
            {
                Pago objPago = new Pago();

                objPago.IdPago = Reader.GetInt32("idpagosventa");
                objPago.NumeroPago = Reader.GetInt32("numeropago");
                objPago.FechaPago = Reader.GetDateTime("fecha");
                objPago.ImportePago = Reader.GetDouble("importepago");
                objPago.MedioPago = Reader.GetString("mediopago");
                objPago.BancoPago = Reader.GetString("banco");
                objPago.NumeroCheque = Reader.GetString("numerocheque");
                objPago.ObservacionPago = Reader.GetString("observacionpago");

                colPagos.Add(objPago);

            }

            Reader.Close();
            return colPagos;
        }