Exemple #1
0
        private void mostrarFactura()
        {
            Entities.Factura fac = controller.mostrarFactura();

            View.Fac f = new View.Fac();
            f.facNumero.Text         = fac.Numero.ToString();
            f.facFecha.Text          = fac.Fecha;
            f.facCliente.Text        = fac.Cliente;
            f.facVendedor.Text       = fac.Vendedor;
            f.facTotal.Text          = fac.ValorTotal.ToString();
            f.gridFactura.DataSource = controller.productosFactura();
            f.Show();
        }
        public IActionResult Put(Entities.Factura eEntidad)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest("Not a valid model"));
            }

            bool resul = _Factura.Modificar(eEntidad);

            if (resul)
            {
                return(Ok());
            }
            else
            {
                return(BadRequest("Erro al modificar una persona"));
            }
        }