public FernetPageViewModel(INavigation navigation)
        {
            Navigation = navigation;
            int Fernet = 1;

            ListaFernet = servicio.Consultar(Fernet);
        }
        public GaseosasPageViewModel(INavigation navigation)
        {
            Navigation = navigation;
            int Aguas = 1;

            ListaGaseosas = servicio.Consultar(Aguas);
        }
示例#3
0
        public JugosPageViewModel(INavigation navigation)
        {
            Navigation = navigation;
            int Aguas = 1;

            ListaJugos = servicio.Consultar(Aguas);
        }
示例#4
0
        private void buttonAñadir_Click(object sender, EventArgs e)
        {
            ConsultaProductosRespuesta respuesta = new ConsultaProductosRespuesta();

            respuesta     = productosService.Consultar();
            LisDetalleAux = respuesta.productos.ToList();
            string codigo = txtCodigo.Text;
            double Iva    = 0.19;

            if (codigo != "")
            {
                DetalleFactura detalle = MapearProductos();

                foreach (var item in LisDetalleAux)
                {
                    if (item.Productos_id == codigo)
                    {
                        detalle.Cantidad = Convert.ToInt32(txtCantidad.Text);
                        if (detalle.Cantidad <= item.Existencia)
                        {
                            if (item.Iva == 19)
                            {
                                detalle.productos.Iva = Convert.ToDecimal(Iva);
                            }
                            else
                            {
                                detalle.productos.Iva = 0;
                            }
                            detalle.productos.Precio_venta = item.Precio_venta;
                            detalle.productos.Nombre       = item.Nombre;
                            detalle.productos.Tipo         = item.Tipo;
                            detalle.productos.Productos_id = item.Productos_id;
                            detalle.CalcularSubTotal();
                            detalle.CalcularIva();
                            detalle.CalcularTotal();
                            detalle.CodigoFactura = txtNFactura.Text;
                            detalle.DetalleFac_id = txtNFactura.Text + i;
                            detalle.Total         = detalle.Total;
                            i++;
                            LisDetalle.Add(detalle);


                            dtgFactura.Rows.Add(txtCodigo.Text, txtNombreProducto.Text, txtPrecio.Text, txtCantidad.Text, detalle.Iva, detalle.Subtotal, detalle.Total);
                            LimpiarPro();
                        }
                        else
                        {
                            MessageBox.Show("Cantida sobre pasa a la existencia del producto, la existencia es de:" + item.Existencia);
                        }
                    }
                }
            }
            else
            {
                MessageBox.Show("Por favor digite un codigo de producto", "Datos", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            AgregarTotales();
        }
示例#5
0
        private void BtnConsultarClientes_Click(object sender, EventArgs e)
        {
            ConsultaProductosRespuesta respuesta = new ConsultaProductosRespuesta();

            DtgConsultarProductos.DataSource = null;
            respuesta = productosService.Consultar();
            DtgConsultarProductos.DataSource = respuesta.productos;
            DtgConsultarProductos.Refresh();
            MessageBox.Show(respuesta.Mensaje, "Busqueda", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }