public void LoadGroup() { SQSGroup.Clear(); Group b = new Group(); b.GroupID = 0; b.GroupName = "All"; SQSGroup.Add(b); client = new SQSAdminServiceClient(); client.Endpoint.Address = new System.ServiceModel.EndpointAddress(CommonVariables.WcfEndpoint); DataSet ds = client.SQSAdmin_Generic_GetAllGroups(); client.Close(); foreach (DataRow dr in ds.Tables[0].Rows) { b = new Group(); b.GroupID = int.Parse(dr["groupid"].ToString()); b.GroupName = dr["groupname"].ToString(); SQSGroup.Add(b); } }