Exemple #1
0
 private void FilterSerach_TextChanged(object sender, TextChangedEventArgs e)
 {
     if (StatutListContainer.IsVisible)
     {
         StatutList.ItemsSource = Statuts.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         StatutSearch           = e.NewTextValue;
     }
     if (EntiteListContainer.IsVisible)
     {
         EntiteList.ItemsSource = Entities.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         EntitySearch           = e.NewTextValue;
     }
     if (ServiceListContainer.IsVisible)
     {
         ServiceList.ItemsSource = Services.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         ServiceSearch           = e.NewTextValue;
     }
     if (DemandeurListContainer.IsVisible)
     {
         DemandeurList.ItemsSource = Demandeurs.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         DemandeurSearch           = e.NewTextValue;
     }
     if (SiteListContainer.IsVisible)
     {
         SiteList.ItemsSource = Sites.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         SiteSearch           = e.NewTextValue;
     }
     if (TypeListContainer.IsVisible)
     {
         TypeList.ItemsSource = Types.Where(statut => statut.Name.ToLower().Contains(e.NewTextValue.ToLower()));
         TypeSearch           = e.NewTextValue;
     }
 }
Exemple #2
0
        private void DemandeurList_ItemSelected(object sender, EventArgs e)
        {
            var SelectedItem = ((StackLayout)sender).BindingContext as AtCheckedItem;

            SelectedItem.IsSelected = !SelectedItem.IsSelected;

            DemandeurBox.IsVisible = Demandeurs.Where(item => item.IsSelected).ToList().Count != 0 ? true : false;
        }
Exemple #3
0
        private void ApplyFilter_Clicked(object sender, EventArgs e)
        {
            FilterElements.Statuts    = Statuts.Where(item => item.IsSelected).Select(item => item.Name).ToList();
            FilterElements.Entities   = Entities.Where(item => item.IsSelected).Select(item => item.Name).ToList();
            FilterElements.Services   = Services.Where(item => item.IsSelected).Select(item => item.Name).ToList();
            FilterElements.Demandeurs = Demandeurs.Where(item => item.IsSelected).Select(item => item.Name).ToList();

            MessagingCenter.Instance.Send(sender: this, AppConstants.FILTER_AT, FilterElements);
        }
Exemple #4
0
        /// <summary>
        /// Recherche si un demandeur et presente des la list lesDemandeurs
        /// en fonction de l'adressemail d'une ligne de frais
        /// </summary>
        /// <param name="laLigne"></param>
        /// <returns></returns>
        private Demandeurs rechercheDemandeur(LigneFrais laLigne)
        {
            Demandeurs leDemandeur = null;

            bool trouve = false;
            int  i      = 0;

            while (lesDemandeurs.Count > i && !trouve)
            {
                if (lesDemandeurs[i].AdresseMail == laLigne.AdresseMail)
                {
                    leDemandeur = lesDemandeurs[i];
                    trouve      = true;
                }

                i++;
            }

            return(leDemandeur);
        }
Exemple #5
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            for (int i = 0; i < 10; i++)
            {
                Entities.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Entity ", (i + 1)),
                    IsSelected = false
                });
                Services.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Service ", (i + 1)),
                    IsSelected = false
                });
                Demandeurs.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Demandeur ", (i + 1)),
                    IsSelected = false
                });
            }

            Statuts = new List <AtCheckedItem>
            {
                new AtCheckedItem
                {
                    Name       = "Draft",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Attente permis",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "En exécution",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Attente Validation",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Attente réception",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Réceptionné",
                    IsSelected = false
                }
            };
            StatutList.ItemsSource = Statuts;

            EntiteList.ItemsSource    = Entities;
            ServiceList.ItemsSource   = Services;
            DemandeurList.ItemsSource = Demandeurs;
        }
Exemple #6
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            for (int i = 0; i < 10; i++)
            {
                Entities.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Entity ", (i + 1)),
                    IsSelected = false
                });
                Services.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Service ", (i + 1)),
                    IsSelected = false
                });
                Demandeurs.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Demandeur ", (i + 1)),
                    IsSelected = false
                });
                Sites.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Site ", (i + 1)),
                    IsSelected = false
                });
                Types.Add(
                    new AtCheckedItem
                {
                    Name       = string.Concat("Type ", (i + 1)),
                    IsSelected = false
                }
                    );
            }

            Statuts = new List <AtCheckedItem>
            {
                new AtCheckedItem
                {
                    Name       = "Draft",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "En cours de préparation",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Attente validation",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Validé",
                    IsSelected = false
                },
                new AtCheckedItem
                {
                    Name       = "Refusé",
                    IsSelected = false
                }
            };
            StatutList.ItemsSource = Statuts;

            EntiteList.ItemsSource    = Entities;
            ServiceList.ItemsSource   = Services;
            DemandeurList.ItemsSource = Demandeurs;
            SiteList.ItemsSource      = Sites;
            TypeList.ItemsSource      = Types;
        }