private void Reset()
 {
     EnregistrementsDisplayed.Clear();
     foreach (Enregistrement e in enregistrementsInDb)
     {
         EnregistrementsDisplayed.Add(e);
     }
 }
        private void FilterDown()
        {
            ObservableCollection <Enregistrement> templist = InitFilter();

            var tempDate = templist.OrderByDescending(e => e.Date);

            EnregistrementsDisplayed.Clear();

            foreach (var item in tempDate)
            {
                EnregistrementsDisplayed.Add(item);
            }
        }
 private void SearchCommand()
 {
     if (SearchedText != "")
     {
         var tempName = _enregistrementsInDb.Where(e => e.Name.ToLower().Contains(SearchedText.ToLower()));
         var tempTags = _enregistrementsInDb.Where(e => e.StringTags.ToLower().Contains(SearchedText.ToLower()));
         EnregistrementsDisplayed.Clear();
         foreach (var item in tempName)
         {
             EnregistrementsDisplayed.Add(item);
         }
         foreach (var item in tempTags)
         {
             if (!EnregistrementsDisplayed.Contains(item))
             {
                 EnregistrementsDisplayed.Add(item);
             }
         }
     }
     else
     {
         Reset();
     }
 }