Dim dsGrupi As DataSet = GetGrupi() Dim db As New dbGate For i = 0 To dsGrupi.Tables(0).Rows.Count - 1 search.Filter = [String].Format("(cn={0})", dsGrupi.Tables(0).Rows(i)(0).Trim()) search.PropertiesToLoad.Add("samaccountname") search.PropertiesToLoad.Add("member") search.PropertiesToLoad.Add("description") result = search.FindOne() If result IsNot Nothing Then Dim dn As [String] Dim clenovi As [String] = "" Dim equalsIndex As Integer Dim commaIndex As Integer Dim user As String = "" For counter As Integer = 0 To result.Properties("samaccountname").Count - 1 dn = result.Properties("samaccountname")(counter).ToString() equalsIndex = dn.IndexOf("=", 1) commaIndex = dn.IndexOf(",", 1) user += dn.Substring(equalsIndex + 1, commaIndex - equalsIndex - 1) + ";" Next txtUsers.Text = user Else MessageBox.Show("Group doesnt exists!") End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)