Esempio n. 1
0
 private void OnDetailCommand(ListBox currentListBox)
 {
     if (currentListBox.Items.Count <= 0)
     {
         Activities_ = string.Empty;
     }
     else
     {
         try
         {
             GetActivities_Result data = (GetActivities_Result)currentListBox.SelectedItem;
             Activities_ = data.ActivityName;
         }
         catch { }
     }
     if (currentListBox.SelectedIndex < 0)
     {
         currentListBox.SelectedIndex = 0;
     }
     DetailActivity = new ObservableCollection <object>(ST.GetDetailActivity(Activities_).ToList());
 }
Esempio n. 2
0
 private void OnDetailCommand()
 {
     DetailCommand = new RelayCommand <ListBox>((p) => true, (p) =>
     {
         if (p.Items.Count <= 0)
         {
             Activities_ = string.Empty;
         }
         else
         {
             try
             {
                 GetActivities_Result data = (GetActivities_Result)p.SelectedItem;
                 Activities_ = data.ActivityName;
             }
             catch { }
         }
         if (p.SelectedIndex < 0)
         {
             p.SelectedIndex = 0;
         }
         DetailActivity = new ObservableCollection <object>(ST.GetDetailActivity(Activities_).ToList());
     });
 }