private async void Precedent_PointerPressed(object sender, PointerRoutedEventArgs e) { if (Plus < 0) { Plus = 0; } Plus -= 3; YnovServiceClient MyService = new YnovServiceClient(); ObservableCollection <MyWebService.Vente> IVente = await MyService.VentesAsync(); (AreaChart.Series[0] as AreaSeries).ItemsSource = IVente.Skip(Plus).Take(3); }
private async void PrecedentB_PointerPressed(object sender, PointerRoutedEventArgs e) { if (PlusB < 0) { PlusB = 0; } PlusB -= 5; YnovServiceClient MyService = new YnovServiceClient(); ObservableCollection <MyWebService.Client> IClient = await MyService.ClientsAsync(); (BubbleChart.Series[0] as BubbleSeries).ItemsSource = IClient.Skip(PlusB).Take(5); }
private async void Suivant_PointerPressed(object sender, PointerRoutedEventArgs e) { YnovServiceClient MyService = new YnovServiceClient(); ObservableCollection <MyWebService.Vente> IVente = await MyService.VentesAsync(); if (Plus > IVente.Count - 14) { Plus = 0; } else { Plus += 3; } (AreaChart.Series[0] as AreaSeries).ItemsSource = IVente.Skip(Plus).Take(3); }
private async void SuivantB_PointerPressed(object sender, PointerRoutedEventArgs e) { YnovServiceClient MyService = new YnovServiceClient(); ObservableCollection <MyWebService.Client> IClient = await MyService.ClientsAsync(); if (PlusB > IClient.Count - 14) { PlusB = 0; } else { PlusB += 5; } (BubbleChart.Series[0] as BubbleSeries).ItemsSource = IClient.Skip(PlusB).Take(5); }
private void TotalSpendByCustomers_Loaded(object sender, RoutedEventArgs e) { YnovServiceClient c = new YnovServiceClient(); ObservableCollection <TotalSpend> TotalSpend = new ObservableCollection <TotalSpend>(); TotalSpend = c.GetTotalSpendByCustomersAsync().Result; List <FinancialStuff> financialStuffList = new List <FinancialStuff>(); for (var i = 0; i < 5; i++) { financialStuffList.Add(new FinancialStuff() { Name = TotalSpend[i].FullName, Amount = (int)TotalSpend[i].Amount }); } var column = (ColumnSeries)sender; column.ItemsSource = financialStuffList; }
private void NbCommandsByCustomers_Loaded(object sender, RoutedEventArgs e) { YnovServiceClient c = new YnovServiceClient(); ObservableCollection <Nb> NbCommands = new ObservableCollection <Nb>(); NbCommands = c.GetNbCommandsByCustomersAsync().Result; List <FinancialStuff> financialStuffList = new List <FinancialStuff>(); for (var i = 0; i < 5; i++) { financialStuffList.Add(new FinancialStuff() { Name = NbCommands[i].FullName, Amount = NbCommands[i].Count }); } var bar = (BarSeries)sender; bar.ItemsSource = financialStuffList; }
private void NbCustomersByCountry_Loaded(object sender, RoutedEventArgs e) { YnovServiceClient c = new YnovServiceClient(); ObservableCollection <CompteurPays> nbCustomers = new ObservableCollection <CompteurPays>(); nbCustomers = c.GetNbCustomersByCountryAsync().Result; List <FinancialStuff> financialStuffList = new List <FinancialStuff>(); for (var i = 0; i < 5; i++) { financialStuffList.Add(new FinancialStuff() { Name = nbCustomers[i].Pays, Amount = nbCustomers[i].Nbr }); } var pie = (PieSeries)sender; pie.ItemsSource = financialStuffList; }
public async static Task LoadData() { YnovServiceClient ysc = new YnovServiceClient(); VariableGlobale.IVente = await ysc.VentesAsync(); VariableGlobale.IResultat = await ysc.ResultatsAsync(); VariableGlobale.IClient = await ysc.ClientsAsync(); VariableGlobale.Fournisseurs = await ysc.GetAllSuppliersAsync(); VariableGlobale.Clients = await ysc.GetCustomersAsync(); VariableGlobale.Produits = await ysc.GetAllProductsAsync(); VariableGlobale.Factures = await ysc.GetAllOrderAsync(); VariableGlobale.FacturesElement = await ysc.GetAllOrderItemAsync(); await ysc.CloseAsync(); }