private void LoadList() { SetListView(); lvwStoreGroups.Items.Clear(); IAzManStoreGroup[] storeGroups = _Store.GetStoreGroups(); foreach (IAzManStoreGroup storeGroup in storeGroups) { //Show all sids rather than owner, if owner is a Store Group if ((_StoreGroup == null) || (_StoreGroup != null && storeGroup.SID.StringValue != _StoreGroup.SID.StringValue)) { ListViewItem oItem = lvwStoreGroups.Items.Add(storeGroup.Name); oItem.SubItems.Add(storeGroup.Description); oItem.SubItems.Add(storeGroup.GroupType == GroupType.Basic ? "Basic Group" : "LDAP Group"); //DataRow dr = dtStoreGroups.NewRow(); //dr["Select"] = false; //dr["Name"] = storeGroup.Name; //dr["Description"] = storeGroup.Description; //dr["Type"] = storeGroup.GroupType == GroupType.Basic ? "Basic group" : "LDAP Query group"; //dtStoreGroups.Rows.Add(dr); } } /** * IAzManAuthorization[] authorizations = _AuthItem.GetAuthorizations(); * foreach (IAzManAuthorization authorization in authorizations) * { * string displayName; * MemberType memberType = authorization.GetMemberInfo(out displayName); * string ownerName; * MemberType ownerType = authorization.GetOwnerInfo(out ownerName); * * ListViewItem oItem = lvwStoreGroups.Items.Add(GetMemberTypeIcon(memberType, authorization.SID)); * oItem.SubItems.Add(displayName); * oItem.SubItems.Add(GetAuthTypeIcon(authorization.AuthorizationType)); * oItem.SubItems.Add(authorization.SidWhereDefined.ToString()); * oItem.SubItems.Add(ownerName); * oItem.SubItems.Add(authorization.ValidFrom.HasValue ? authorization.ValidFrom.Value.ToString("yyyy-MM-dd") : ""); * oItem.SubItems.Add(authorization.ValidTo.HasValue ? authorization.ValidTo.Value.ToString("yyyy-MM-dd") : ""); * } */ lvwStoreGroups.Sort(); }
private void LoadList() { SetListView(); lvwStoreGroups.Items.Clear(); IAzManStoreGroup[] storeGroups = _Store.GetStoreGroups(); foreach (IAzManStoreGroup storeGroup in storeGroups) { //Show all sids rather than owner, if owner is a Store Group if ((_StoreGroup == null) || (_StoreGroup != null && storeGroup.SID.StringValue != _StoreGroup.SID.StringValue)) { ListViewItem oItem = lvwStoreGroups.Items.Add(storeGroup.Name); oItem.SubItems.Add(storeGroup.Description); oItem.SubItems.Add(storeGroup.GroupType == GroupType.Basic ? "Basic Group" : "LDAP Group"); } } lvwStoreGroups.Sort(); }
private void listView_Load() { listView.Items.Clear(); var ln = 1; foreach (var sg in _Store.GetStoreGroups()) { ListViewItem oItem = listView.Items.Add(sg.Name); #region Icon oItem.SmallImage = new IconResourceHandle(GlobalVars.Theme + ".24.mdi-account-multiple.png"); oItem.LargeImage = new IconResourceHandle(GlobalVars.Theme + ".32.mdi-account-multiple.png"); #endregion oItem.SubItems.Add(sg.Description); oItem.SubItems.Add(sg.GroupType.ToString()); oItem.SubItems.Add(sg.SID.ToString()); ln++; } listView.Sort(); }