Esempio n. 1
0
        public ProductoViewModel()
        {
            Servicio.Consultar();
            ///el metodo asincrono espera que se ejecute el metodo guardar, y se puede ejecutar mientras la propiedad no este ocupad

            GuardarCommand    = new Command(async() => await Guardar(), () => !Isbusy);
            ModificarCommnand = new Command(async() => await Modificar(), () => !Isbusy);
            EliminarCommand   = new Command(async() => await Elimiar(), () => !Isbusy);
            LimpiarCommand    = new Command(Limpiar);
        }
Esempio n. 2
0
        public async Task <ObservableCollection <ProductoModel> > Consultar()
        {
            CollecProductosView = await servicioView.Consultar();

            return(CollecProductosView);
        }