Exemple #1
0
        private void loadImpuestos()
        {
            Conexione     repo = new Conexione();
            SqlConnection con  = repo.AbrirConexion();
            Factura       fact = repo.DatosUltimaFactura(con);

            txtPorcenIRPF.Text = fact.IRPF;
            txtPorcenIVA.Text  = fact.IVA;
            txtNumFactura.Text = fact.numFactura;
        }
Exemple #2
0
        private void loadImpuestos(string facturaABuscar)
        {
            Conexione     repo  = new Conexione();
            SqlConnection con   = repo.AbrirConexion();
            long          value = 0;

            fact = repo.DatosUltimaFactura(con);
            txtPorcenIRPF.Text = fact.IRPF;
            txtPorcenIVA.Text  = fact.IVA;
            if (String.IsNullOrEmpty(facturaABuscar))
            {
                if (long.TryParse(fact.numFactura, out value))
                {
                    value = value + 1;
                    txtNumFactura.Text = value.ToString();
                }
            }
            else
            {
                txtNumFactura.Text = fact.numFactura;
            }
        }