private void InitParas() { //初始化控件的状态 client.GetSysMenuByTypeCompleted += new EventHandler <GetSysMenuByTypeCompletedEventArgs>(client_GetSysMenuByTypeCompleted); client.GetSysMenuByTypeAsync(SystemType, ""); }
//void ServiceClient_GetSysMenuByTypeCompleted(object sender, GetSysMenuByTypeCompletedEventArgs e) //{ // cbxMenu.ItemsSource = null; // if (e.Result != null) // { // //绑定角色名称 // List<T_SYS_ENTITYMENU> ents = e.Result.ToList(); // cbxMenu.ItemsSource = ents; // cbxMenu.DisplayMemberPath = "MENUNAME"; // foreach (var item in cbxMenu.Items) // { // T_SYS_ENTITYMENU tmp = item as T_SYS_ENTITYMENU; // if (tmp != null && CustPerm != null && CustPerm.T_SYS_ENTITYMENU != null // && tmp.ENTITYMENUID == this.CustPerm.T_SYS_ENTITYMENU.ENTITYMENUID) // { // cbxMenu.SelectedItem = item; // break; // } // } // } //} void ServiceClient_GetEntityMenuCustomPermByIDCompleted(object sender, GetEntityMenuCustomPermByIDCompletedEventArgs e) { CustPerm = e.Result; BindORG(); ServiceClient.GetSysMenuByTypeAsync("", ""); ServiceClient.FindSysPermissionByTypeAsync(""); }
void ServiceClient_GetRoleEntityMenuByIDCompleted(object sender, GetRoleEntityMenuByIDCompletedEventArgs e) { this.RoleMenu = e.Result; //绑定系统类型 //ServiceClient.GetSysDictionaryByCategoryAsync("SYSTEMTYPE"); ServiceClient.GetSysMenuByTypeAsync("", ""); ServiceClient.GetSysRoleInfosAsync("", ""); }
/// <summary> /// 选择系统,切换加载功能项的树 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cbxSystemType_SelectionChanged(object sender, SelectionChangedEventArgs e) { treeMenu.Items.Clear(); T_SYS_DICTIONARY dict = cbxSystemType.SelectedItem as T_SYS_DICTIONARY; if (dict != null) { client.GetSysMenuByTypeAsync(dict.DICTIONARYVALUE.ToString(), ""); } }
void LoadData() { ServiceClient.GetSysMenuByTypeAsync("", ""); }