public void LoadGroup() { GroupDao groupDao = new GroupDao(); groupDao.MakeConnection(Properties.Resources.strConnection); addEventWindow.GroupData = groupDao.LoadListGroupName(((App)Application.Current).UserName); List <CheckBox> groupShowList = new List <CheckBox>(); int count = 1; foreach (GroupDto groupDto in groupDao.LoadListGroupName(((App)Application.Current).UserName)) { CheckBox checkBox = new CheckBox(); checkBox.Content = count + " " + groupDto.Name; groupShowList.Add(checkBox); count++; } addEventWindow.Group = groupShowList; }