예제 #1
0
        internal async Task ActualizarMercaderiaARecibir(ToolStripStatusLabel toolStripStatusPedido, PopupNotifier popupNotifier)
        {
            int totalMercaderiaARecibir          = 0;
            List <Mercaderia> MercaderiaARecibir = await MercaderiaService.Buscar(null, null, DateTime.Now, fechaRecepcionMercaderiaHasta, null, MercaderiaEstado.Guardada, "Fecha", DireccionOrdenamiento.Desc, 1, Settings.Default.PaginadoCantidadElementosPorPagina, out totalMercaderiaARecibir);

            toolStripStatusPedido.Text = $"Total Ingreso Mercaderia: {totalMercaderiaARecibir}";

            if (totalMercaderiaARecibir > 0)
            {
                popupNotifier.ContentText = string.Format(popupNotifier.ContentText, totalMercaderiaARecibir);
                popupNotifier.Popup();
            }
        }
예제 #2
0
        internal async Task BuscarAsync()
        {
            this.MercaderiaListadoItem = new List <MercaderiaListadoItem>();

            DateTime?fechaAltaDesde      = FechaAltaFiltroHabilitado ? FechaAltaDesde : (DateTime?)null;
            DateTime?fechaAltaHasta      = FechaAltaFiltroHabilitado ? FechaAltaHasta : (DateTime?)null;
            DateTime?fechaRecepcionDesde = FechaRecepcionFiltroHabilitado ? FechaRecepcionDesde : (DateTime?)null;
            DateTime?fechaRecepcionHasta = FechaRecepcionFiltroHabilitado ? FechaRecepcionHasta : (DateTime?)null;
            int      totalElementos      = 0;

            List <Mercaderia> mercaderias = await MercaderiaService.Buscar(fechaAltaDesde, fechaAltaHasta, fechaRecepcionDesde, fechaRecepcionHasta, ProveedorSeleccionado.Key, MercaderiaEstadoSeleccionado.Key, OrdenadoPor, DireccionOrdenamiento, PaginaActual, ElementosPorPagina, out totalElementos);

            mercaderias.ForEach(x => MercaderiaListadoItem.Add(new MercaderiaListadoItem(x)));
            TotalElementos = totalElementos;

            NotifyPropertyChanged(nameof(MercaderiaListadoItem));
            NotifyPropertyChanged(nameof(TotalElementos));
        }