Ejemplo n.º 1
0
        public async Task FicMetloadInfoEstatus(String Estatus)
        {
            bool encontro = false;

            try
            {
                if (FicSourceAutoCompleteEstatus != null && FicSourceAutoCompleteEstatus.Count() > 0)
                {
                    foreach (zt_cat_estatus est in FicSourceAutoCompleteEstatus)
                    {
                        if (est.DesEstatus.ToLower() == Estatus.ToLower())
                        {
                            _IdEstatus = est; encontro = true;
                        }
                        else
                        {
                            if (encontro == false) /*_IdEstatus = new zt_cat_estatus(); _IdEstatus.DesEstatus = "";*/ } {
                    }
                }
                //if(encontro == false) { _IdEstatus = (from e in FicSourceAutoCompleteEstatus where e.IdEstatus == "20" select e).ToList()[0];
            }
        }
        catch (Exception e) { }
        FicEstatus(encontro);
    }
Ejemplo 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