public void OnClickAddGroupButton(object sender, EventArgs e)
        {
            NSApplication.SharedApplication.StopModal();
            var form = new ShowAllGroupsController();

            form.ServerDto  = ServerDto;
            form.TenantName = TenantName;
            form.DomainName = UserDto.Domain;
            var result = NSApplication.SharedApplication.RunModalForWindow(form.Window);

            if (result == VMIdentityConstants.DIALOGOK)
            {
                foreach (var group in form.SelectedGroups)
                {
                    var principalName = group.GroupName + "@" + group.GroupDomain;
                    if (!Groups.Exists(x => (x.GroupName + "@" + x.GroupDomain) == principalName))
                    {
                        Groups.Add(group);
                    }
                }
                var listView = new GroupsDataSource {
                    Entries = Groups
                };
                lstGroups.DataSource = listView;
                lstGroups.ReloadData();
            }
        }
Exemple #2
0
        public void OnClickAddMember(object sender, EventArgs e)
        {
            var form = new ShowAllGroupsController()
            {
                IsSystemDomain = IsSystemDomain
            };

            form.ServerDto  = ServerDto;
            form.TenantName = TenantName;
            form.DomainName = GroupDto.GroupDomain;
            var result = NSApplication.SharedApplication.RunModalForWindow(form.Window);

            if (result == VMIdentityConstants.DIALOGOK)
            {
                if (GroupsMembershipDtoOriginal.Groups == null)
                {
                    this.GroupMembershipDto.Groups = new List <GroupDto> ();
                }
                foreach (var group in form.SelectedGroups)
                {
                    var principalName = group.GroupName + "@" + group.GroupDomain;
                    if (!GroupsMembershipDtoOriginal.Groups.Exists(x => (x.GroupName + "@" + x.GroupDomain) == principalName))
                    {
                        this.GroupMembershipDto.Groups.Add(group);
                    }
                }
                SetGroupDataSource(GroupMembershipDto);
            }
        }
		public void OnClickAddGroupButton (object sender, EventArgs e)
		{
			NSApplication.SharedApplication.StopModal ();
			var form = new ShowAllGroupsController ();
			form.ServerDto = ServerDto;
			form.TenantName = TenantName;
			form.DomainName = UserDto.Domain;
			var result = NSApplication.SharedApplication.RunModalForWindow (form.Window);
			if (result == VMIdentityConstants.DIALOGOK) {
				foreach (var group in form.SelectedGroups) {
					var principalName = group.GroupName + "@" + group.GroupDomain;
					if (!Groups.Exists (x => (x.GroupName + "@" + x.GroupDomain) == principalName))
						Groups.Add (group);
				}
				var listView = new GroupsDataSource { Entries = Groups };
				MemberTableView.DataSource = listView;
				MemberTableView.ReloadData ();
			}
		}
		public void OnClickAddMember (object sender, EventArgs e)
		{
			var form = new ShowAllGroupsController (){IsSystemDomain = IsSystemDomain};
			form.ServerDto = ServerDto;
			form.TenantName = TenantName;
			form.DomainName = GroupDto.GroupDomain;
			var result = NSApplication.SharedApplication.RunModalForWindow (form.Window);
			if (result == VMIdentityConstants.DIALOGOK) {
				if (GroupsMembershipDtoOriginal.Groups == null)
					this.GroupMembershipDto.Groups = new List<GroupDto> ();
				foreach (var group in form.SelectedGroups) {
					var principalName = group.GroupName + "@" + group.GroupDomain;
					if (!GroupsMembershipDtoOriginal.Groups.Exists (x => (x.GroupName + "@" + x.GroupDomain) == principalName))
						this.GroupMembershipDto.Groups.Add (group);
				}
				SetGroupDataSource (GroupMembershipDto);
			}
		}