/// <summary> /// 查询用户角色列表 /// </summary> /// <param name="callback"></param> public void QueryAllRoles(SystemRoleQueryFilter filter, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback) { filter.PagingInfo = new ECCentral.QueryFilter.Common.PagingInfo() //这个PagingInfo是我们在ECCentral.BizEntity里自己定义的,只有这3个属性 { PageSize = PageSize, PageIndex = PageIndex, SortBy = SortField }; string relativeUrl = "/CommonService/AuthCenter/SystemRole/Query"; restClient.QueryDynamicData(relativeUrl, filter, callback); }
void WPMessageMaintain_OnLoad(object sender, EventArgs e) { OnLoad -= new EventHandler(WPMessageMaintain_OnLoad); if (CPApplication.Current.CurrentPage.Context.Request.URL.IndexOf("localhost") > -1) { btnShow.Visibility = System.Windows.Visibility.Visible; } facade = new WPMessagFacade(this); SystemRoleQueryFilter filter = new SystemRoleQueryFilter(); filter.RoleName = string.Empty; filter.RoleStatus = AuthCenterStatus.Activated; facade.QueryAllRoles(filter, 10000, 1, string.Empty, (s2, args2) => { if (args2.FaultsHandle()) { return; } bindVM = DynamicConverter <SystemRoleVM> .ConvertToVMList <List <SystemRoleVM> >(args2.Result.Rows); oldBindVM = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone(bindVM); roleList.ItemsSource = bindVM; facade.GetAllCategory((s, args) => { if (args.FaultsHandle()) { return; } List <WPMessageCategory> list = args.Result; cbmMessageType.ItemsSource = list; cbmMessageType2.ItemsSource = bindVM; bindCategory = list.Convert <WPMessageCategory, WPMessageCategoryVM>();// DynamicConverter<WPMessageCategoryVM>.ConvertToVMList<List<WPMessageCategoryVM>>(list); OldBindCategory = Newegg.Oversea.Silverlight.Utilities.UtilityHelper.DeepClone(bindCategory); cateList.ItemsSource = bindCategory; //if (bindVM.Count > 0) // UpdateTheRolesList(bindVM[0].SysNo.Value.ToString()); }); }); }