internal async Task BorrarAsync(TipoGasto tipoGastos) { tipoGastos.Borrar(); await TipoGastoService.Guardar(tipoGastos); await BuscarAsync(); }
internal async Task CargarTipoGastoAsync() { IList <Modelo.TipoGasto> tipoGasto = await TipoGastoService.Buscar(null, true); this.TiposGastos.AddRange(tipoGasto.Select(x => new KeyValuePair <Modelo.TipoGasto, string>(x, x.Descripcion))); this.TiposGastos.Insert(0, new KeyValuePair <Modelo.TipoGasto, string>(null, Resources.comboSeleccionarOpcion)); NotifyPropertyChanged(nameof(TiposGastos)); }
internal async Task BuscarAsync() { TipoGastos = new SortableBindingList <TipoGasto>(await TipoGastoService.Buscar(Descripcion, null)); NotifyPropertyChanged(nameof(TipoGastos)); }
internal Task Guardar() { TipoGasto tipoGasto = new TipoGasto(Id, Descripcion, Habilitada); return(TipoGastoService.Guardar(tipoGasto)); }