예제 #1
0
 public MainPageVM()
 {
     _manejadoraBL = new ManejadoraBL();
     _listadoBL    = new ListadoPersonasBL();
     fillList();
     _mostrarMensaje = false;
 }
예제 #2
0
        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);
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        private async void rellenaListaPersona()
        {
            try
            {
                ListadoPersonasBL personas = new ListadoPersonasBL();
                _listpersonas = await personas.getListaPersonaBL();

                NotifyPropertyChanged("ListaDepersonas");

                _habilitarProgressRing = false;
                NotifyPropertyChanged("habilitarProgressRing");
            }
            catch (Exception e) { }
        }
예제 #4
0
        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
        }