public MainPageVM() { _manejadoraBL = new ManejadoraBL(); _listadoBL = new ListadoPersonasBL(); fillList(); _mostrarMensaje = false; }
public MainPageMV() { gestionBL = new GestionadoraBL(); personas = new ListadoPersonasBL(); _listpersonas = new ObservableCollection <Persona>(personas.getListaPersonaBL()); _listAuxiliarParaBuscarPersonas = new ObservableCollection <Persona>(_listpersonas); _delegateCommandEliminarPersona = new DelegateCommand(ExecuteEliminarPersona, CanExecuteEliminarPersona); _delegateCommandAgregar = new DelegateCommand(ExecuteAgregarPersona); _delegateCommandGuardar = new DelegateCommand(ExecuteGuardarPersona, CanExecuteGuardarPersona); _delegateCommandBuscar = new DelegateCommand(ExecuteBuscarPersona, CanExecuteBuscarPersona); }
/// <summary> /// /// </summary> private async void rellenaListaPersona() { try { ListadoPersonasBL personas = new ListadoPersonasBL(); _listpersonas = await personas.getListaPersonaBL(); NotifyPropertyChanged("ListaDepersonas"); _habilitarProgressRing = false; NotifyPropertyChanged("habilitarProgressRing"); } catch (Exception e) { } }
public async void fillList() { try { _listadoBL = new ListadoPersonasBL(); this._mListaCompleta = new ObservableCollection <clsPersona>(await _listadoBL.getListadoBL()); this._mListaConBusqueda = this._mListaCompleta; _mHabiliteProgressring = false; NotifyPropertyChanged("mListaCompleta"); NotifyPropertyChanged("mListaConBusqueda"); NotifyPropertyChanged("mHabiliteProgressring"); } catch (Exception e) { } //Por la forma en que lo hacemos debemos notificar. No siempre es necesario }