/// <summary> /// 查询记录 /// </summary> private void BtnSearch_Click(object sender) { ObservableCollection <SystemModule> source = new SystemModuleBIZ().SelectAll(); var pagedSource = new QueryableCollectionView(source); View.DGSelect.ItemsSource = pagedSource; View.searchDataPager.Source = pagedSource; View.DGSelect.SelectedItems.Remove(View.DGSelect.SelectedItem);//取消首行选中 }
private void MenuLoadRef() { // 获取用户功能列表 var sysmenu = new SystemModuleBIZ().SelectAll(); foreach (SystemModule data in sysmenu) { ZNC.Component.ImageButton2.DynamicImageButton ImgBtn = new ZNC.Component.ImageButton2.DynamicImageButton { Name = "btn_" + data.Code, Content = data.Name, FontSize = 16, Margin = new Thickness(0, 2, 0, 2), HorizontalContentAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, Visibility = Visibility.Visible, Foreground = new SolidColorBrush(Colors.White) }; ImgBtn.IconImage = new BitmapImage(new Uri("pack://siteoforigin:,,,/image/" + data.PicUrl)); //ImgBtn.Click += new RoutedEventHandler(VM.Menu_Click); //this.MenuPanel.Children.Add(ImgBtn); } }