Exemplo n.º 1
0
        public static void Modifica(Factura factura, Factura FactAnt, Contexto contexto)
        {
            double modificado = factura.Total - FactAnt.Total;

            var Cliente = contexto.Cliente.Find(factura.FacturaID);

            Cliente.Deuda += modificado;
            ClienteBLL.Modificar(Cliente);
        }
Exemplo n.º 2
0
        public static void ModificarBien(Factura factura, Factura FacturasAnteriores)
        {
            Contexto contexto           = new Contexto();
            var      Cliente            = contexto.Cliente.Find(factura.ClienteId);
            var      ClientesAnteriores = contexto.Cliente.Find(FacturasAnteriores.ClienteId);

            Cliente.Deuda            += factura.Total;
            ClientesAnteriores.Deuda -= FacturasAnteriores.Total;
            ClienteBLL.Modificar(Cliente);
            ClienteBLL.Modificar(ClientesAnteriores);
        }