Exemplo n.º 1
0
        internal async Task BuscarAsync()
        {
            int totalElementos = 0;

            Gastos.Clear();

            List <Modelo.Gasto> gastoModel = await GastoService.Buscar(FechaDesde, FechaHasta, TipoGastoSeleccionada.Key, UsuarioSeleccionado.Key?.Alias, AnuladaSeleccionado.Key, SaleDeCajaSeleccionado.Key, OrdenadoPor, DireccionOrdenamiento, PaginaActual, ElementosPorPagina, out totalElementos);

            gastoModel.ForEach(x => Gastos.Add(new GastoListadoItem(x)));

            TotalElementos = totalElementos;
            NotifyPropertyChanged(nameof(gastoModel));
        }
Exemplo n.º 2
0
        internal void DeleteSelf(PayrollBatchs parent)
        {
            // if we're not dirty then don't update the database
            if (!this.IsDirty)
            {
                return;
            }

            // if we're new then don't update the database
            if (this.IsNew)
            {
                return;
            }

            Gastos.Clear();

            SessionCode = parent.SessionCode;
            Session().Delete(Session().Get <PayrollBatchRecord>(Oid));

            MarkNew();
        }