コード例 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            ITagRoleService service = new TagRoleService();

            _roles = service.GetList();
            DataGrid1.ItemsSource = _roles;
        }
コード例 #2
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            bll         = AppContext.GetLocationBll();
            areaService = new AreaService(bll);
            aarService  = new AreaAuthorizationRecordService(bll);

            ITagRoleService service = new TagRoleService();

            _roles = service.GetList();

            var tree = areaService.GetTree();

            TopoTreeView1.LoadData(tree, false, true);
            TopoTreeView1.ExpandLevel(2);


            DataGrid1.ItemsSource = _roles;

            CardRole selectedRole = _roles.Find(i => i.Id == roleId);

            if (selectedRole != null)
            {
                selectedRole.IsChecked = true;
                DataGrid1.SelectedItem = selectedRole;
                //CheckRoleAreas(selectedRole.Id);
            }
        }
        private void LoadRoleList()
        {
            var service = new TagRoleService();

            CbRoleList.ItemsSource   = service.GetList();
            CbRoleList.SelectedIndex = 0;
        }