public HistoricosOfertaPageViewModel(AzureService azureService, OfertasService ofertasService)
 {
     this.azureService   = azureService;
     this.ofertasService = ofertasService;
     PrimaryAction       = new Command(ExecuteCriarOfertaAsync);
     Init();
 }
        public OfertasPageViewModel(AzureService service, OfertasService ofertasService)
        {
            azureService        = service;
            this.ofertasService = ofertasService;
            Ofertas             = new ObservableCollection <OfertaDto>();
            OfertaDetailCommand = new Command <OfertaDto>(ExecuteDetailOfertaAsync);

            FillListViewAsync();
        }
Example #3
0
 public OfertaDto(Estabelecimento estabelecimento, Oferta oferta, Produto produto, UnidadeMedida unidade, Tipo tipo, Marca marca, OfertasService ofertasService)
 {
     idOFerta                      = oferta.Id;
     this.ofertasService           = ofertasService;
     UpdatedAt                     = oferta.UpdatedAt;
     ValorOferta                   = oferta.PrecoAtual;
     Confiabilidade                = ofertasService.CalculateConfiabilidade(oferta);
     Estabelecimento               = estabelecimento?.Nome;
     DescricaoOferta               = $"{produto?.Nome} - {tipo?.Nome}, {marca?.Nome}, {produto?.QuantidadeMensuravel} {unidade?.Nome}";
     AumentarConfiabilidadeCommand = new Command(ExecuteAplicarLikeAsync);
     DiminuirConfiabilidadeCommand = new Command(ExecuteAplicarDislikeAsync);
     ShareOfertaCommand            = new Command(ExecuteCompartilharOfertaAsync);
     OfertaDetailCommand           = new Command(ExecuteMonitorarOfertaAsync);
 }
Example #4
0
 public OfertasTabDetailPageViewModel(OfertasService ofertasService)
 {
     this.ofertasService = ofertasService;
 }