public void ConsultarFactura()
        {
            try
            {
                Core.LogicaNegocio.Entidades.Factura factura =
                    new Core.LogicaNegocio.Entidades.Factura();

                factura.Numero = int.Parse(_vista.Busqueda.Text);

                Core.LogicaNegocio.Comandos.ComandoFactura.ConsultarxFacturaID comandoConsultar =
                    Core.LogicaNegocio.Fabricas.FabricaComandosFactura.CrearComandoConsultarxFacturaID(factura);

                factura = comandoConsultar.Ejecutar();

                _vista.NombrePropuesta.Text    = factura.Prop.Titulo;
                _vista.MontoPropuesta.Text     = factura.Prop.MontoTotal.ToString();
                _vista.NumeroFactura.Text      = factura.Numero.ToString();
                _vista.TituloFactura.Text      = factura.Titulo;
                _vista.DescripcionFactura.Text = factura.Descripcion;
                _vista.EstadoFactura.Text      = factura.Estado;
                _vista.FechaFactura.Text       = factura.Fechaingreso.ToShortDateString().ToString();
                _vista.PorcentajeFactura.Text  = factura.Procentajepagado.ToString() + " %";
                _vista.TotalFactura.Text       = (factura.Prop.MontoTotal * (factura.Procentajepagado / 100)).ToString();

                _vista.ActivarElementos();
            }
            catch (WebException e)
            {
                _vista.Pintar("Error WEB anulando la factura");
                _vista.MensajeVisible = true;
            }
            catch (ConsultarException e)
            {
                _vista.Pintar(e.Message);
                _vista.MensajeVisible = true;
            }
            catch (Exception e)
            {
                _vista.Pintar(e.Message);
                _vista.MensajeVisible = true;
            }
        }
Exemple #2
0
        public void ConsultarFactura()
        {
            try
            {
                Core.LogicaNegocio.Entidades.Factura factura =
                    new Core.LogicaNegocio.Entidades.Factura();

                factura.Numero = int.Parse(_vista.NumeroFactura.Text);

                Core.LogicaNegocio.Comandos.ComandoFactura.ConsultarxFacturaID comandoConsultar =
                    Core.LogicaNegocio.Fabricas.FabricaComandosFactura.CrearComandoConsultarxFacturaID(factura);

                factura = comandoConsultar.Ejecutar();

                List <Core.LogicaNegocio.Entidades.Factura> lista = new List <Core.LogicaNegocio.Entidades.Factura>();
                lista.Add(factura);

                _vista.DetalleFactura.DataSource = lista;
                _vista.DetalleFactura.DataBind();
            }
            catch (WebException e)
            {
                _vista.Pintar("Error WEB consultando");
                _vista.MensajeVisible = true;
            }
            catch (ConsultarException e)
            {
                _vista.Pintar(e.Message);
                _vista.MensajeVisible = true;
            }
            catch (Exception e)
            {
                _vista.Pintar(e.Message);
                _vista.MensajeVisible = true;
            }
        }