Пример #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="groups"></param>
 public void InitData(Dictionary <string, string> groups)
 {
     foreach (var vv in groups.Where(e => e.Value == this.FullName))
     {
         UserTreeItemViewModel groupViewModel = new UserTreeItemViewModel()
         {
             Name = vv.Key, Database = Database
         };
         groupViewModel.Parent = this;
         this.Children.Add(groupViewModel);
     }
 }
Пример #2
0
        private void QueryGroups()
        {
            Application.Current.Dispatcher.Invoke(() => {
                this.mUserViewModel.Children.Clear();
            });

            var vv = DevelopServiceHelper.Helper.QueryDatabaseUserGroups(this.Database);

            if (vv != null)
            {
                foreach (var vvv in vv.Where(e => string.IsNullOrEmpty(e.Value)))
                {
                    Application.Current.Dispatcher.Invoke(() => {
                        UserTreeItemViewModel groupViewModel = new UserTreeItemViewModel()
                        {
                            mName = vvv.Key, Database = Database
                        };
                        mUserViewModel.Children.Add(groupViewModel);
                        groupViewModel.InitData(vv);
                    });
                }
            }
        }