Ejemplo n.º 1
0
        private async Task <ObservableCollection <EstoqueModel> > BuscarEstoque(string scdCodigo)
        {
            EstoqueLogic el      = new EstoqueLogic();
            string       estoque = await el.GetEstoque(scdCodigo);

            ObservableCollection <EstoqueModel> retorno = JsonConvert.DeserializeObject <ObservableCollection <EstoqueModel> >(estoque);

            return(retorno);
        }
Ejemplo n.º 2
0
        private async void AdicionarFamilia(object obj)
        {
            EstoqueLogic el      = new EstoqueLogic();
            var          familia = await Application.Current.MainPage.DisplayPromptAsync("Nova Familia", "Qual o nome da nova Familia?");

            if (!String.IsNullOrEmpty(familia))
            {
                await el.SalvarFamilia(0, familia);
            }
        }
Ejemplo n.º 3
0
 internal async void GravarMovim(long nid)
 {
     try
     {
         EstoqueLogic el = new EstoqueLogic();
         await el.SalvarMovimEstoque(nid, TpMovimSelected.ID_TPMOVIM, VL_MOVIM, QT_MOVIM, DS_HISTORICO);
     }
     catch
     {
     }
 }
        private async void GetMovimEstoque()
        {
            try
            {
                IsBusy = true;
                EstoqueLogic el   = new EstoqueLogic();
                var          json = await el.GetMovimeEstoque("");

                lstMovEstoque = JsonConvert.DeserializeObject <ObservableCollection <MovimEstoqueModel> >(json);
                IsBusy        = false;
            }
            catch { }
        }
Ejemplo n.º 5
0
        private async void GetTipoMovim()
        {
            try
            {
                EstoqueLogic el   = new EstoqueLogic();
                var          json = await el.GetTipoMovim();

                lstTpMovim = JsonConvert.DeserializeObject <ObservableCollection <TipoMovimModel> >(json);
            }
            catch
            {
            }
        }
Ejemplo n.º 6
0
        public async void AdicionarFamilia()
        {
            try
            {
                EstoqueLogic el      = new EstoqueLogic();
                var          familia = await Application.Current.MainPage.DisplayPromptAsync("Nova Familia", "Qual o nome da nova Familia?");

                if (!String.IsNullOrEmpty(familia))
                {
                    await el.SalvarFamilia(0, familia);
                }

                BuscarFamilias();
            }
            catch { }
        }
Ejemplo n.º 7
0
        public async void EditarFamilia(long nid, string sdsFamilia)
        {
            try
            {
                EstoqueLogic el      = new EstoqueLogic();
                var          familia = await Application.Current.MainPage.DisplayPromptAsync("Editar Familia", "Altere o nome da Família", placeholder : sdsFamilia);

                if (!String.IsNullOrEmpty(familia))
                {
                    await el.SalvarFamilia(nid, familia);
                }

                BuscarFamilias();
            }
            catch { }
        }
Ejemplo n.º 8
0
        internal async Task BuscarProduto(string texto)
        {
            try
            {
                IsBusy = true;
                EstoqueLogic el      = new EstoqueLogic();
                string       estoque = await el.GetEstoque(texto);

                ObservableCollection <EstoqueModel> retorno = JsonConvert.DeserializeObject <ObservableCollection <EstoqueModel> >(estoque);

                lstEstoque = retorno;
            }
            finally
            {
                IsBusy = false;
            }
        }
Ejemplo n.º 9
0
        private async void BuscarFamilias()
        {
            try
            {
                IsBusy = true;
                try
                {
                    EstoqueLogic el   = new EstoqueLogic();
                    var          json = await el.GetFamilias();

                    lstFamilias = JsonConvert.DeserializeObject <ObservableCollection <FamiliaModel> >(json);
                }
                catch { }
            }
            finally
            {
                IsBusy = false;
            }
        }
        public async Task BuscarProduto(string texto)
        {
            try
            {
                IsBusy = true;
                try
                {
                    EstoqueLogic el      = new EstoqueLogic();
                    string       estoque = await el.GetMovimeEstoque(texto);

                    var retorno = JsonConvert.DeserializeObject <ObservableCollection <MovimEstoqueModel> >(estoque);
                    lstMovEstoque = retorno;
                }
                catch { }
            }
            finally
            {
                IsBusy = false;
            }
        }