Example #1
0
        public List <ReporteViewModel> ListarVentas(TestVentaContext db)
        {
            ventaLogica = new VentaRepository(db);
            List <ReporteViewModel> list = ventaLogica.MostrarVentas();

            return(list);
        }
        public Cliente BuscarCliente(TestVentaContext db, string identidad)
        {
            clienteLogica = new ClienteRepository(db);
            Cliente clienteSearch = clienteLogica.Buscar(identidad);

            return(clienteSearch);
        }
Example #3
0
        public Producto BuscarProducto(TestVentaContext db, string nombreProd)
        {
            productoLogica = new ProductoRepository(db);
            Producto productoSearch = productoLogica.Buscar(nombreProd);

            return(productoSearch);
        }
Example #4
0
        public void EditarMontoTotal(TestVentaContext db, string idOperac)
        {
            ventaLogica = new VentaRepository(db);
            float montoEditar = ConvertirAlTotal(db, idOperac);

            ventaLogica.ActualizarMontoTotal(Convert.ToInt32(idOperac), montoEditar);
        }
Example #5
0
        public IEnumerable <Producto> ListarProductos(TestVentaContext db)
        {
            productoLogica = new ProductoRepository(db);
            IEnumerable <Producto> listaProducto = productoLogica.Mostrar();

            return(listaProducto);
        }
Example #6
0
        private float ConvertirAlTotal(TestVentaContext db, string codigoOperac)
        {
            ventaLogica = new VentaRepository(db);
            IEnumerable <DetalleVenta> montosubtotal = ventaLogica.ObtenerSubTotal(Convert.ToInt32(codigoOperac));
            float totalDetVen = 0f;

            foreach (var item in montosubtotal)
            {
                totalDetVen += (float)item.SubTotal;
            }
            return(totalDetVen);
        }
Example #7
0
 public VentaRepository(TestVentaContext context)
 {
     _context = context;
 }
 public void RegistrarCliente(TestVentaContext db, Cliente clien)
 {
     clienteLogica = new ClienteRepository(db);
     clienteLogica.Agregar(clien);
 }
 public MercaderiaController(TestVentaContext con)
 {
     _con = con;
 }
 public TransaccionController(TestVentaContext con)
 {
     _con = con;
 }
Example #11
0
 public PersonaController(TestVentaContext con)
 {
     _con = con;
 }
Example #12
0
 public void RegistrarDetalleVenta(TestVentaContext db, DetalleVenta detvent)
 {
     ventaLogica = new VentaRepository(db);
     ventaLogica._Agregar(detvent);
 }
Example #13
0
 public void RegistrarVenta(TestVentaContext db, Venta vent)
 {
     ventaLogica = new VentaRepository(db);
     ventaLogica.Agregar(vent);
 }
Example #14
0
 public void RegistrarProducto(TestVentaContext db, Producto prod)
 {
     productoLogica = new ProductoRepository(db);
     productoLogica.Agregar(prod);
 }
 public ClienteRepository(TestVentaContext context)
 {
     _context = context;
 }
Example #16
0
 public ProductoRepository(TestVentaContext context)
 {
     _context = context;
 }