void UserRoleApplyForm_Loaded(object sender, RoutedEventArgs e) { permClient.GetSysCommonPermissionAllAsync(); if (operationType == FormTypes.New) { InitApplyerInfo(); roleInfo.ROLEID = Guid.NewGuid().ToString(); roleInfo.OWNERCOMPANYID = Common.CurrentLoginUserInfo.UserPosts[0].CompanyID; roleInfo.OWNERDEPARTMENTID = Common.CurrentLoginUserInfo.UserPosts[0].DepartmentID; roleInfo.OWNERPOSTID = Common.CurrentLoginUserInfo.UserPosts[0].PostID; roleInfo.OWNERID = Common.CurrentLoginUserInfo.EmployeeID; this.cbxSystemType.SelectedIndex = 0; EntityMenuCustomer = new EntityMenuCustomerPermission2(FormTypes.New, roleInfo.ROLEID); EntityMenuCustomer.IsCheckState = true;//被权限控制调用 EntityBrowser brow = new EntityBrowser(EntityMenuCustomer); CustomerPermission.Children.Add(EntityMenuCustomer); } else { permClient.GetSysRoleSingleInfoByIdAsync(tmpRoleID); EntityMenuCustomer = new EntityMenuCustomerPermission2(operationType, tmpRoleID); EntityBrowser brow = new EntityBrowser(EntityMenuCustomer); EntityMenuCustomer.IsCheckState = true;//被权限控制调用 if (operationType == FormTypes.Audit || operationType == FormTypes.Browse) { SetControlsEnabled(); EntityMenuCustomer.StateIsRead = true; } CustomerPermission.Children.Add(EntityMenuCustomer); } }
void ServiceClient_GetSysDictionaryByCategoryCompleted(object sender, GetSysDictionaryByCategoryCompletedEventArgs e) { //绑定系统类型 if (e.Result != null) { List <T_SYS_DICTIONARY> dicts = e.Result.ToList(); tmpDicts = dicts; cbxSystemType.ItemsSource = dicts; cbxSystemType.DisplayMemberPath = "DICTIONARYNAME"; if (FormType == FormTypes.Edit || formType == FormTypes.Browse) { ServiceClient.GetSysRoleSingleInfoByIdAsync(tmpRoleId); } //if(tmpDictionaryValue) } }