Example #1
0
        void OrderList(string orderBy)
        {
            _dialogService.ShowLoading("Atualizando");

            if (orderBy.Equals(EnumOrderType.Preco.GetDescription()))
            {
                Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.PrecoVenda));
            }
            if (orderBy.Equals(EnumOrderType.Dormitorios.GetDescription()))
            {
                Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.Dormitorios));
            }
            if (orderBy.Equals(EnumOrderType.Suites.GetDescription()))
            {
                Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.Suites));
            }
            if (orderBy.Equals(EnumOrderType.Vagas.GetDescription()))
            {
                Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.Vagas));
            }
            if (orderBy.Equals(EnumOrderType.AreaTotal.GetDescription()))
            {
                Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.AreaTotal));
            }

            _dialogService.HideLoading();
        }
Example #2
0
        void OrderList(string orderBy)
        {
            _dialogService.ShowLoading("Reordenando");

            try
            {
                if (orderBy.Equals(EnumOrderType.Preco.GetDescription()))
                {
                    Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.PrecoVenda));
                }
                if (orderBy.Equals(EnumOrderType.Dormitorios.GetDescription()))
                {
                    Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.Dormitorios));
                }
                if (orderBy.Equals(EnumOrderType.Suites.GetDescription()))
                {
                    Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.Suites));
                }
                if (orderBy.Equals(EnumOrderType.Vagas.GetDescription()))
                {
                    Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.Vagas));
                }
                if (orderBy.Equals(EnumOrderType.AreaTotal.GetDescription()))
                {
                    Imoveis = new ObservableCollection <Imovei>(Imoveis.OrderByDescending(x => x.AreaTotal));
                }

                _dialogService.HideLoading();
            }
            catch (Exception ex)
            {
                _dialogService.ShowToast(EnumToastType.Error, ex.Message);
                _dialogService.HideLoading();
            }
        }
Example #3
0
        async Task SetData()
        {
            _dialogService.ShowLoading("Carregando detalhes");

            var data = await _rootObjectService.Get(EnumAPIPath.details, ImovelId);

            if (data != null)
            {
                var imoveis = await _imovelService.GetAll();

                if (imoveis != null)
                {
                    Imovel = imoveis.FirstOrDefault(x => x.CodImovel == ImovelId);
                    if (Imovel != null)
                    {
                        ConfigureImovelForPresentation();
                    }
                }
            }
            else
            {
                IsDataPresented = false;
            }

            _dialogService.HideLoading();
        }