Пример #1
0
 private void OnClosingAddItem(object sender, DialogClosingEventArgs eventArgs)
 {
     if (rvm.Result)
     {
         try
         {
             var liste = (CategoryModel)lv_itemsCategory.SelectedItem;
             if (liste != null)
             {
                 lv_items.ItemsSource = mg.GetItemsByCat(liste.Id);
             }
         }
         catch
         {
         }
     }
 }
Пример #2
0
        // On select category show list of items
        private void showItemsOnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            mg = new ManagementModel();
            var liste = (CategoryModel)lv_itemsCategory.SelectedItem;

            if (liste != null)
            {
                idItemCat                   = liste.Id;
                nameItemCat                 = liste.Title;
                lv_items.ItemsSource        = mg.GetItemsByCat(idItemCat);
                lv_itemsOptions.ItemsSource = null;
            }
        }