Ejemplo n.º 1
0
 public void MassEdit()
 {
     if (SearchResul != null && SearchResul.Any())
     {
         var editMass = new MassEditViewModel(type, (IEnumerable <object>)SearchResul);
         //var view = DataHelpers.container.Get<ViewManager>();
         //var bind = view.CreateAndBindViewForModelIfNecessary(editMass);
         DataHelpers.windowManager.ShowWindow(editMass);
     }
     else
     {
         DataHelpers.ShowMessage(_("Filter les résultats d'abord"));
         return;
     }
 }
Ejemplo n.º 2
0
        public async void ExporterPDF()
        {
            if (SearchResul?.Any() == true)
            {
                windowManager.ShowWindow(new PrintWindowViewModel(SearchResul));
            }
            else
            {
                var response = MessageBox.Show("Voulez-vous exporter tous les documents?", "Confirmation", MessageBoxButton.YesNo);
                if (response == MessageBoxResult.Yes)
                {
                    SearchResul = await datahelper.GetData <T>(a => true);

                    windowManager.ShowWindow(new PrintWindowViewModel(SearchResul));
                }
            }
        }
Ejemplo n.º 3
0
 public async void ExporterPDF()
 {
     if (SearchResul?.Any() == true)
     {
         windowManager.ShowWindow(new PrintWindowViewModel(SearchResul));
     }
     else
     {
         var response = DataHelpers.ShowMessage(_("Voulez-vous exporter tous les documents?"), _("Confirmation"), MessageBoxButton.YesNo);
         if (response == MessageBoxResult.Yes)
         {
             if (SaveVisible == false)
             {
                 SearchResul = _list.ToList <T>();
                 windowManager.ShowWindow(new PrintWindowViewModel(SearchResul));
             }
             else
             {
                 SearchResul = DS.db.GetAll <T>();// await datahelper.GetData<T>(a => true);
                 windowManager.ShowWindow(new PrintWindowViewModel(SearchResul));
             }
         }
     }
 }