public PartlyCollection <BPrivilege> GetResearchResult(PrivilegeFilter filter) { WhereSqlClauseBuilder where = filter.ConvertToWhereBuilder(); where.AppendItem("Isdeleted", 0); QueryCondition qc = new QueryCondition( filter.RowIndex, filter.PageSize, " * ", ORMapping.GetTableName <BPrivilege>(), " Createtime ", where.ToSqlString(TSqlBuilder.Instance) ); PartlyCollection <BPrivilege> result = GetPageSplitedCollection(qc); return(result); }
/// <summary> /// 查询列表&分页 /// </summary> /// <param name="filter"></param> /// <returns></returns> public AjaxResult GetList(PrivilegeFilter filter) { var list = _privilegeService.GetList(); return(AjaxResult.Success(list)); }
public WindowExplorerOtherPrivileges( IWriteToOutput iWriteToOutput , CommonConfiguration commonConfig , IOrganizationServiceExtented service , IEnumerable <Privilege> privileges , string filter ) : base(iWriteToOutput, commonConfig, service) { this.IncreaseInit(); InitializeComponent(); SetInputLanguageEnglish(); if (privileges != null) { _cachePrivileges[service.ConnectionData.ConnectionId] = privileges; } FillComboBoxTrueFalse(cmBRoleIsManaged); FillComboBoxTrueFalse(cmBRoleIsTemplate); FillComboBoxTrueFalse(cmBRoleIsCustomizable); LoadFromConfig(); txtBOtherPrivilegesFilter.Text = filter; txtBOtherPrivilegesFilter.SelectionLength = 0; txtBOtherPrivilegesFilter.SelectionStart = txtBOtherPrivilegesFilter.Text.Length; txtBOtherPrivilegesFilter.Focus(); this._menuItemsSetPrivilegeDepths = new Dictionary <PrivilegeDepth, MenuItem>() { { PrivilegeDepth.Basic, mISetOtherPrivilegeRightBasic } , { PrivilegeDepth.Local, mISetOtherPrivilegeRightLocal } , { PrivilegeDepth.Deep, mISetOtherPrivilegeRightDeep } , { PrivilegeDepth.Global, mISetOtherPrivilegeRightGlobal } }; _privilegeFilter = new PrivilegeFilter(); _privilegeFilter.CloseClicked += this.privilegeFilter_CloseClicked; this._popupPrivilegeFilter = new Popup { Child = _privilegeFilter, PlacementTarget = lblFilterOtherPrivileges, Placement = PlacementMode.Bottom, StaysOpen = false, Focusable = true, }; _popupPrivilegeFilter.Closed += this.popupPrivilegeFilter_Closed; lstVwOtherPrivileges.ItemsSource = _itemsSourceOtherPrivileges = new ObservableCollection <OtherPrivilegeListViewItem>(); _itemsSourceSecurityRoleList = new ObservableCollection <OtherPrivilegeRolePrivilegeViewItem>(); lstVwSecurityRoles.ItemsSource = _itemsSourceSecurityRoleList; cmBCurrentConnection.ItemsSource = service.ConnectionData.ConnectionConfiguration.Connections; cmBCurrentConnection.SelectedItem = service.ConnectionData; FillExplorersMenuItems(); this.DecreaseInit(); var task = ShowExistingOtherPrivileges(); }