private void Window_Loaded(object sender, RoutedEventArgs e) { ITagRoleService service = new TagRoleService(); _roles = service.GetList(); DataGrid1.ItemsSource = _roles; }
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; }