예제 #1
0
 private void treeObjects_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
 {
     if (treeDBObjects.SelectedItem != null)
     {
         var ObjectDTO = (treeDBObjects.SelectedItem as TreeViewItem).DataContext as ObjectDTO;
         if (ObjectDTO != null)
         {
             ObjectSelectedArg arg = new ObjectSelectedArg();
             arg.Object = ObjectDTO;
             if (ObjectSelected != null)
             {
                 ObjectSelected(this, arg);
             }
         }
     }
 }
예제 #2
0
 private void TreeDBObjects_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     e.Handled = true;
     if (treeDBObjects.SelectedItem != null)
     {
         var ObjectDTO = (treeDBObjects.SelectedItem as RadTreeViewItem).DataContext as ObjectDTO;
         if (ObjectDTO != null)
         {
             ObjectSelectedArg arg = new ObjectSelectedArg();
             arg.Object = ObjectDTO;
             if (ObjectSelected != null)
             {
                 ObjectSelected(this, arg);
             }
         }
     }
 }
 void ucObjectList_ObjectSelected(object sender, ObjectSelectedArg e)
 {
     Object  = e.Object;
     Actions = SecurityHelper.GetActionsByCategory(Object.ObjectCategory);
     //if(Object.ObjectCategory==DatabaseObjectCategory.Column )
     // {
     //     if(bizColumn.IsColumnPrimaryKey(Object.ObjectIdentity))
     //     {
     //         if(Actions.Any(x=>x.Action==))
     //     }
     // }
     //List<SecActionDTO> list = new List<SecActionDTO>();
     //foreach (var action in actions)
     //{
     //    SecActionDTO item = new SecActionDTO();
     //    item.Action = action;
     //    list.Add(item);
     //}
     //dtgRoleActions.ItemsSource = list;
     frmSecurityAction.SetActionTree(Actions);
     GetMessage();
 }