Exemplo n.º 1
0
        public async void OnAppearing()
        {
            try
            {
                var source_local_inv = await IFicSrvInventariosList.FicMetGetListInventarios();

                if (source_local_inv != null)
                {
                    foreach (zt_inventarios inv in source_local_inv)
                    {
                        _FicSfDataGrid_ItemSource_Inventario.Add(inv);
                    }
                }//LLENAR EL GRID
            }
            catch (Exception e)
            {
                await new Page().DisplayAlert("ALERTA", e.Message.ToString(), "OK");
            }
        }//SOBRE CARGA AL METODO OnAppearing() DE LA VIEW
Exemplo n.º 2
0
    public async void OnAppearing()
    {
        try
        {
            _FicSourceAutoCompleteEstatus             = new List <zt_cat_estatus>();
            _FicSfDataGrid_ItemSource_Inventario      = new List <zt_inventarios>();
            _FicSfDataGrid_ItemSource_InventarioTotal = new List <zt_inventarios>();
            _FicSourceAutoCompleteEstatus             = await IFicSrvinventarioslist.FicMetGetEstatusList() as List <zt_cat_estatus>;

            var todos = new zt_cat_estatus()
            {
                IdEstatus = "20", DesEstatus = "Todos", FechaReg = DateTime.Today, UsuarioReg = "System"
            };
            var proceso = new zt_cat_estatus()
            {
                IdEstatus = "19", DesEstatus = "En Proceso", FechaReg = DateTime.Today, UsuarioReg = "System"
            };
            _IdEstatus = proceso;
            _FicSourceAutoCompleteEstatus.Add(todos);
            _FicSourceAutoCompleteEstatus.Add(proceso); RaisePropertyChanged("FicSourceAutoCompleteEstatus");
            var source_local_inv = await IFicSrvinventarioslist.FicMetGetListInventarios();

            if (source_local_inv != null)
            {
                _FicSfDataGrid_ItemSource_Inventario.Clear();
                _FicSfDataGrid_ItemSource_InventarioTotal.Clear();
                foreach (zt_inventarios inv in source_local_inv)
                {
                    _FicSfDataGrid_ItemSource_Inventario.Add(inv);
                    _FicSfDataGrid_ItemSource_InventarioTotal.Add(inv);
                }
            }    //LLENAR EL GRID
            RaisePropertyChanged("IdEstatus");
            RaisePropertyChanged("FicSfDataGrid_ItemSource_InventarioTotal");
            RaisePropertyChanged("FicSfDataGrid_ItemSource_Inventario");
        }
        catch (Exception e)
        {
            await App.Current.MainPage.DisplayAlert("ALERTA", e.Message.ToString(), "OK");
        }
    }    //SOBRE CARGA AL METODO OnAppearing() DE LA VIEW